Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Typos fixed #2893

Merged
merged 7 commits into from
Mar 27, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion conjecture-rust/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ It also positively affects `distributions::good_bitlengths` as it does not have

# Conjecture for Rust 0.6.0 (2021-01-27)

This release is required following an unsuccesful deploy of 0.5.0 due to usage of a cargo keyword that was too long.
This release is required following an unsuccessful deploy of 0.5.0 due to usage of a cargo keyword that was too long.

# Conjecture for Rust 0.5.0 (2021-01-27)

Expand Down
3 changes: 3 additions & 0 deletions hypothesis-python/RELEASE.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
RELEASE_TYPE: patch

This patch fixes some internal typos. There is no user-visible change.
6 changes: 3 additions & 3 deletions hypothesis-python/docs/changes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -843,7 +843,7 @@ Previously :func:`python:typing.get_type_hints`, was used by default.
If argument names varied between the ``__annotations__`` and ``__signature__``,
they would not be supplied to the target.

This was particularily an issue for :pypi:`pydantic` models which use an
This was particularly an issue for :pypi:`pydantic` models which use an
`alias generator <https://pydantic-docs.helpmanual.io/usage/model_config/#alias-generator>`__.

.. _v5.30.1:
Expand Down Expand Up @@ -3966,7 +3966,7 @@ so you probably won't see much effect specifically from that.

This patch removes some overhead from :func:`~hypothesis.extra.numpy.arrays`
with a constant shape and dtype. The resulting performance improvement is
modest, but worthwile for small arrays.
modest, but worthwhile for small arrays.

.. _v4.7.17:

Expand Down Expand Up @@ -5561,7 +5561,7 @@ This is a docs-only patch, fixing some typos and formatting issues.

This change fixes a small bug in how the core engine caches the results of
previously-tried inputs. The effect is unlikely to be noticeable, but it might
avoid unnecesary work in some cases.
avoid unnecessary work in some cases.

.. _v3.68.1:

Expand Down
2 changes: 1 addition & 1 deletion hypothesis-python/docs/details.rst
Original file line number Diff line number Diff line change
Expand Up @@ -766,7 +766,7 @@ replay, shrink, deduplicate, and report whatever errors were discovered.

- The :obj:`~hypothesis.settings.database` setting *is* used by fuzzing mode -
adding failures to the database to be replayed when you next run your tests
is our preferred reporting mechanism and reponse to
is our preferred reporting mechanism and response to
`the 'fuzzer taming' problem <https://blog.regehr.org/archives/925>`__.
- The :obj:`~hypothesis.settings.verbosity` and
:obj:`~hypothesis.settings.stateful_step_count` settings work as usual.
Expand Down
2 changes: 1 addition & 1 deletion hypothesis-python/docs/strategies.rst
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ concurrent programs.
:pypi:`pymtl3` is "an open-source Python-based hardware generation, simulation,
and verification framework with multi-level hardware modeling support", which
ships with Hypothesis integrations to check that all of those levels are
eqivalent, from function-level to register-transfer level and even to hardware.
equivalent, from function-level to register-transfer level and even to hardware.

:pypi:`libarchimedes` makes it easy to use Hypothesis in
`the Hy language <https://github.com/hylang/hy>`_, a Lisp embedded in Python.
Expand Down
4 changes: 2 additions & 2 deletions hypothesis-python/src/hypothesis/extra/ghostwriter.py
Original file line number Diff line number Diff line change
Expand Up @@ -958,7 +958,7 @@ def _make_binop_body(
except_: Tuple[Type[Exception], ...],
style: str,
) -> Tuple[Set[Union[str, Tuple[str, str]]], str]:
# TODO: collapse togther first two strategies, keep any others (for flags etc.)
# TODO: collapse together first two strategies, keep any others (for flags etc.)
# assign this as a global variable, which will be prepended to the test bodies
strategies = _get_strategies(func)
operands, b = [strategies.pop(p) for p in list(_get_params(func))[:2]]
Expand Down Expand Up @@ -1016,7 +1016,7 @@ def maker(
identity = "identity element here" # type: ignore
# If the repr of this element is invalid Python, stringify it - this
# can't be executed as-is, but at least makes it clear what should
# happpen. E.g. type(None) -> <class 'NoneType'> -> quoted.
# happen. E.g. type(None) -> <class 'NoneType'> -> quoted.
try:
# We don't actually execute this code object; we're just compiling
# to check that the repr is syntatically valid. HOWEVER, we're
Expand Down
2 changes: 1 addition & 1 deletion hypothesis-python/src/hypothesis/extra/lark.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
Note that as Lark is at version 0.x, this module *may* break API compatibility
in minor releases if supporting the latest version of Lark would otherwise be
infeasible. We may also be quite aggressive in bumping the minimum version of
Lark, unless someone volunteers to either fund or do the maintainence.
Lark, unless someone volunteers to either fund or do the maintenance.
"""

from inspect import getfullargspec
Expand Down
2 changes: 1 addition & 1 deletion hypothesis-python/src/hypothesis/extra/numpy.py
Original file line number Diff line number Diff line change
Expand Up @@ -604,7 +604,7 @@ def complex_number_dtypes(
"""Return a strategy for complex-number dtypes.

sizes is the total size in bits of a complex number, which consists
of two floats. Complex halfs (a 16-bit real part) are not supported
of two floats. Complex halves (a 16-bit real part) are not supported
by numpy and will not be generated by this strategy.
"""
return dtype_factory("c", sizes, (64, 128, 192, 256), endianness)
Expand Down
2 changes: 1 addition & 1 deletion hypothesis-python/src/hypothesis/internal/charmap.py
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@ def query(
exclude_characters="",
):
"""Return a tuple of intervals covering the codepoints for all characters
that meet the critera (min_codepoint <= codepoint(c) <= max_codepoint and
that meet the criteria (min_codepoint <= codepoint(c) <= max_codepoint and
any(cat in include_categories for cat in categories(c)) and all(cat not in
exclude_categories for cat in categories(c)) or (c in include_characters)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -496,7 +496,7 @@ def equivalent(self, other):
"""Checks whether this DFA and other match precisely the same
language.

Uses the classic algorith of Hopcroft and Karp (more or less):
Uses the classic algorithm of Hopcroft and Karp (more or less):
Hopcroft, John E. A linear algorithm for testing equivalence
of finite automata. Vol. 114. Defense Technical Information Center, 1971.
"""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ class Shrinker:
The two easiest ways to do this are:

* Just run the N steps in random order. As long as a
reasonably large proportion of the operations suceed, this
reasonably large proportion of the operations succeed, this
guarantees the expected stall length is quite short. The
book keeping for making sure this does the right thing when
it succeeds can be quite annoying.
Expand Down
2 changes: 1 addition & 1 deletion hypothesis-python/src/hypothesis/stateful.py
Original file line number Diff line number Diff line change
Expand Up @@ -479,7 +479,7 @@ def multiple(*args):


def _convert_targets(targets, target):
"""Single validator and convertor for target arguments."""
"""Single validator and converter for target arguments."""
if target is not None:
if targets:
raise InvalidArgument(
Expand Down
2 changes: 1 addition & 1 deletion hypothesis-python/src/hypothesis/statistics.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def describe_targets(best_targets):
"""Return a list of lines describing the results of `target`, if any."""
# These lines are included in the general statistics description below,
# but also printed immediately below failing examples to alleviate the
# "threshold problem" where shrinking can make severe bug look trival.
# "threshold problem" where shrinking can make severe bug look trivial.
# See https://github.com/HypothesisWorks/hypothesis/issues/2180
if not best_targets:
return []
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@


class TupleStrategy(SearchStrategy):
"""A strategy responsible for fixed length tuples based on heterogenous
"""A strategy responsible for fixed length tuples based on heterogeneous
strategies for each of their elements."""

def __init__(self, strategies):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1436,7 +1436,7 @@ def complex_numbers(
is an error to enable ``allow_nan``. If ``max_magnitude`` is finite,
it is an error to enable ``allow_infinity``.

The magnitude contraints are respected up to a relative error
The magnitude constraints are respected up to a relative error
of (around) floating-point epsilon, due to implementation via
the system ``sqrt`` function.

Expand Down
2 changes: 1 addition & 1 deletion hypothesis-python/tests/cover/test_health_checks.py
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ def slow_init_integers(*args, **kwargs):
def test_lazy_slow_initialization_issue_2108_regression(data):
# Slow init in strategies wrapped in a LazyStrategy, inside an interactive draw,
# should be attributed to drawing from the strategy (not the test function).
# Specificially, this used to fail with a DeadlineExceeded error.
# Specifically, this used to fail with a DeadlineExceeded error.
data.draw(LazyStrategy(slow_init_integers, (), {}))


Expand Down
2 changes: 1 addition & 1 deletion hypothesis-python/tests/cover/test_targeting.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ def test_respects_max_pool_size(observations):


def everything_except(type_):
# Note: we would usually stick to fater traditional or parametrized
# Note: we would usually stick to faster traditional or parametrized
# tests to check that invalid inputs are rejected, but for `target()`
# we need to use `@given` (to validate arguments instead of context)
# so we might as well apply this neat recipe.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ def test_bound_correct_forward_ref(built):
)
def test_bound_correct_forward_ref_python36():
"""
Very special case for ``python3.6`` where we have this feature partially suported.
Very special case for ``python3.6`` where we have this feature partially supported.

Due to ``TypeVar`` module definition bug.
"""
Expand Down
2 changes: 1 addition & 1 deletion hypothesis-python/tests/lark/test_grammar.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ def test_can_generate_ignored_tokens():
%ignore WS
"""
strategy = from_lark(Lark(list_grammar, start="list"))
# A JSON list of strings in canoncial form which does not round-trip,
# A JSON list of strings in canonical form which does not round-trip,
# must contain ignorable whitespace in the initial string.
find_any(strategy, lambda s: "\t" in s)

Expand Down
2 changes: 1 addition & 1 deletion hypothesis-python/tests/nocover/test_regex.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ def test_case_insensitive_not_literal_never_constructs_multichar_match(data):
for _ in range(5):
s = data.draw(strategy)
assert pattern.fullmatch(s) is not None
# And to be on the safe side, we implment this stronger property:
# And to be on the safe side, we implement this stronger property:
assert set(s).isdisjoint(I_WITH_DOT.swapcase())


Expand Down
2 changes: 1 addition & 1 deletion hypothesis-python/tests/numpy/test_gen_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -406,7 +406,7 @@ def test_unique_array_with_fill_can_use_all_elements(arr):

@given(nps.arrays(dtype="uint8", shape=25, unique=True, fill=st.nothing()))
def test_unique_array_without_fill(arr):
# This test covers the collision-related branchs for fully dense unique arrays.
# This test covers the collision-related branches for fully dense unique arrays.
# Choosing 25 of 256 possible elements means we're almost certain to see colisions
# thanks to the 'birthday paradox', but finding unique elemennts is still easy.
assume(len(set(arr)) == arr.size)
Expand Down
2 changes: 1 addition & 1 deletion hypothesis-ruby/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ manually pass a seed.

# Hypothesis for Ruby 0.1.2 (2018-09-24)

This release makes the code useable via a direct require.
This release makes the code usable via a direct require.
I.e. no need for rubygems or any special LOAD_PATH.

For example, if the base directory were in /opt, you'd just say:
Expand Down
3 changes: 3 additions & 0 deletions hypothesis-ruby/RELEASE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
RELEASE_TYPE: patch

This patch fixes some internal typos. There is no user-visible change.
2 changes: 1 addition & 1 deletion hypothesis-ruby/lib/hypothesis.rb
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ def hypothesis_stable_identifier
# the previous examples.

# Note that essentially any answer to this method is
# "fine" in that the failure mode is that sometiems we
# "fine" in that the failure mode is that sometimes we
# just won't run the same test, but it's nice to keep
# this as stable as possible if the code isn't changing.

Expand Down
1 change: 1 addition & 0 deletions requirements/tools.in
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
blacken-docs
codespell
coverage
django
dpcontracts
Expand Down
2 changes: 2 additions & 0 deletions requirements/tools.txt
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ click==7.1.2
# pip-tools
# pybetter
# pyemojify
codespell==2.0.0
# via -r requirements/tools.in
colorama==0.4.4
# via twine
com2ann==0.1.1
Expand Down
6 changes: 6 additions & 0 deletions tooling/ignore-list.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
crate
nd
ned
nin
strat
tread
13 changes: 13 additions & 0 deletions tooling/src/hypothesistooling/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,17 @@ def check_installed():
don't fail to run if a previous install failed midway)."""


def codespell(*files):
pip_tool(
"codespell",
"--check-hidden",
"--check-filenames",
"--ignore-words=./tooling/ignore-list.txt",
"--skip=__pycache__,.mypy_cache,.venv,.git,tlds-alpha-by-domain.txt",
*files,
)


@task()
def lint():
pip_tool(
Expand All @@ -71,6 +82,7 @@ def lint():
"--config",
os.path.join(tools.ROOT, ".flake8"),
)
codespell(*[f for f in tools.all_files() if not f.endswith("by-domain.txt")])


HEAD = tools.hash_for_name("HEAD")
Expand Down Expand Up @@ -210,6 +222,7 @@ def should_format_doc_file(path):
o.write(source)
o.write("\n")

codespell("--write-changes", *files_to_format, *doc_files_to_format)
pip_tool("shed", *files_to_format, *doc_files_to_format)


Expand Down