Skip to content

Commit 2822e66

Browse files
authored
Merge pull request #4658 from veeceey/fix/typo-combined-fixes
Fix duplicate word typos in comments and documentation
2 parents a2c1b52 + d5443c9 commit 2822e66

16 files changed

Lines changed: 51 additions & 33 deletions

File tree

guides/testing-hypothesis.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Note: This guide is currently entirely specific to the Python version of
66
Hypothesis.
77

88
This is a guide to the process of testing Hypothesis itself, both how to
9-
run its tests and how to to write new ones.
9+
run its tests and how to write new ones.
1010

1111
--------------------------
1212
General Testing Philosophy

hypothesis-python/RELEASE.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
RELEASE_TYPE: patch
2+
3+
This patch fixes several duplicate word typos in comments and documentation.

hypothesis-python/docs/changelog.rst

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6264,7 +6264,7 @@ affecting the :pypi:`returns` package (:issue:`3060`).
62646264
6.14.8 - 2021-08-16
62656265
-------------------
62666266

6267-
This patch ensures that registering a strategy for a subclass of a a parametrised
6267+
This patch ensures that registering a strategy for a subclass of a parametrised
62686268
generic type such as ``class Lines(Sequence[str]):`` will not "leak" into unrelated
62696269
strategies such as ``st.from_type(Sequence[int])`` (:issue:`2951`).
62706270
Unfortunately this fix requires :pep:`560`, meaning Python 3.7 or later.
@@ -8272,7 +8272,7 @@ caused an internal error. This bug was introduced in :ref:`version 5.8.1 <v5.8.
82728272
5.10.1 - 2020-04-19
82738273
-------------------
82748274

8275-
This release is a small internal refactoring to how shrinking interacts with :ref:`targeted property-based testing <targeted>` that should have no user user visible impact.
8275+
This release is a small internal refactoring to how shrinking interacts with :ref:`targeted property-based testing <targeted>` that should have no user visible impact.
82768276

82778277
.. _v5.10.0:
82788278

@@ -8773,7 +8773,7 @@ Removals
87738773
- ``hypothesis.settings.buffer``, without replacement
87748774
- ``hypothesis.PrintSettings``, because :obj:`hypothesis.settings.print_blob` takes ``True`` or ``False``
87758775
- ``hypothesis.settings.timeout``, in favor of :obj:`hypothesis.settings.deadline`
8776-
- ``hypothesis.unlimited`` without replacement (only only useful as argument to ``timeout``)
8776+
- ``hypothesis.unlimited`` without replacement (only useful as argument to ``timeout``)
87778777

87788778
Hypothesis 4.x
87798779
==============
@@ -8806,7 +8806,7 @@ with :func:`~hypothesis.strategies.from_type`:
88068806
- :class:`python:typing.SupportsRound`
88078807

88088808
Note that using :func:`~hypothesis.strategies.from_type` with one of the above strategies will not
8809-
ensure that the the specified function will execute successfully (ie : the strategy returned for
8809+
ensure that the specified function will execute successfully (ie : the strategy returned for
88108810
``from_type(typing.SupportsAbs)`` may include NaNs or things which cause the :func:`python:abs`
88118811
function to error. )
88128812

@@ -12837,7 +12837,7 @@ not recommended for direct use by other users of Hypothesis.
1283712837
-------------------
1283812838

1283912839
This release adds a new mechanism to infer strategies for classes
12840-
defined using :pypi:`attrs`, based on the the type, converter, or
12840+
defined using :pypi:`attrs`, based on the type, converter, or
1284112841
validator of each attribute. This inference is now built in to
1284212842
:func:`~hypothesis.strategies.builds` and :func:`~hypothesis.strategies.from_type`.
1284312843

@@ -14193,7 +14193,7 @@ Hypothesis now emits deprecation warnings if you apply
1419314193
:func:`@given <hypothesis.given>` more than once to a target.
1419414194

1419514195
Applying :func:`@given <hypothesis.given>` repeatedly wraps the target multiple
14196-
times. Each wrapper will search the space of of possible parameters separately.
14196+
times. Each wrapper will search the space of possible parameters separately.
1419714197
This is equivalent but will be much more inefficient than doing it with a
1419814198
single call to :func:`@given <hypothesis.given>`.
1419914199

@@ -15659,7 +15659,7 @@ Minor bug fix release.
1565915659
can both now be called with an empty argument
1566015660
list, in which case they also never generate any values.
1566115661
* :func:`~hypothesis.strategies.one_of` may now be called with a single argument that is a collection of strategies
15662-
as well as as varargs.
15662+
as well as varargs.
1566315663
* Add a :func:`~hypothesis.strategies.runner` strategy which returns the instance of the current test object
1566415664
if there is one.
1566515665
* 'Bundle' for RuleBasedStateMachine is now a normal(ish) strategy and can be used
@@ -16186,7 +16186,7 @@ Bug fixes:
1618616186
1.11.0 - 2015-08-31
1618716187
-------------------
1618816188

16189-
* text() with a non-string alphabet would have used the repr() of the the alphabet
16189+
* text() with a non-string alphabet would have used the repr() of the alphabet
1619016190
instead of its contexts. This is obviously silly. It now works with any sequence
1619116191
of things convertible to unicode strings.
1619216192
* @given will now work on methods whose definitions contains no explicit positional
@@ -17026,7 +17026,7 @@ Bug fixes:
1702617026

1702717027
Other:
1702817028

17029-
* A lot of internals have been been rewritten. This shouldn't affect you at all, but
17029+
* A lot of internals have been rewritten. This shouldn't affect you at all, but
1703017030
it opens the way for certain of hypothesis's oddities to be a lot more extensible by
1703117031
users. Whether this is a good thing may be up for debate...
1703217032

hypothesis-python/src/hypothesis/database.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1027,7 +1027,7 @@ def _get_bytes(self, url: str) -> bytes | None: # pragma: no cover
10271027
else:
10281028
warning_message = (
10291029
"Could not get the latest artifact from GitHub. "
1030-
"This could be because because the repository "
1030+
"This could be because the repository "
10311031
"or artifact does not exist. "
10321032
)
10331033
# see https://github.com/python/cpython/issues/128734
@@ -1105,7 +1105,7 @@ def fetch(self, key: bytes) -> Iterable[bytes]:
11051105
kp = self._key_path(key)
11061106

11071107
with ZipFile(self._artifact) as zf:
1108-
# Get the all files in the the kp from the cache
1108+
# Get all the files in the kp from the cache
11091109
filenames = self._access_cache.get(kp, ())
11101110
for filename in filenames:
11111111
with zf.open(filename.as_posix()) as f:

hypothesis-python/src/hypothesis/extra/_array_helpers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -607,7 +607,7 @@ def _draw_loop_dimensions(self, data, use=None):
607607
else:
608608
side = dim_side
609609

610-
# Use a trick where where a biased coin is queried to see
610+
# Use a trick where a biased coin is queried to see
611611
# if the given shape-tuple will continue to be grown. All
612612
# of the relevant draws will still be made for the given
613613
# shape-tuple even if it is no longer being added to.

hypothesis-python/src/hypothesis/extra/array_api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -784,7 +784,7 @@ def indices(
784784
:func:`~hypothesis.strategies.slices` instead.
785785
* ``min_dims`` is the minimum dimensionality of the resulting array from use
786786
of the generated index.
787-
* ``max_dims`` is the the maximum dimensionality of the resulting array,
787+
* ``max_dims`` is the maximum dimensionality of the resulting array,
788788
defaulting to ``len(shape) if not allow_newaxis else
789789
max(len(shape), min_dims) + 2``.
790790
* ``allow_ellipsis`` specifies whether ``None`` is allowed in the index.

hypothesis-python/src/hypothesis/extra/numpy.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1166,7 +1166,7 @@ def basic_indices(
11661166
* ``min_dims`` is the minimum dimensionality of the resulting array from use
11671167
of the generated index. When ``min_dims == 0``, scalars and zero-dimensional
11681168
arrays are both allowed.
1169-
* ``max_dims`` is the the maximum dimensionality of the resulting array,
1169+
* ``max_dims`` is the maximum dimensionality of the resulting array,
11701170
defaulting to ``len(shape) if not allow_newaxis else
11711171
max(len(shape), min_dims) + 2``.
11721172
* ``allow_newaxis`` specifies whether ``None`` is allowed in the index.

hypothesis-python/src/hypothesis/internal/conjecture/data.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ def structural_coverage(label: int) -> StructuralCoverageTag:
142142
class Span:
143143
"""A span tracks the hierarchical structure of choices within a single test run.
144144
145-
Spans are created to mark regions of the choice sequence that that are
145+
Spans are created to mark regions of the choice sequence that are
146146
logically related to each other. For instance, Hypothesis tracks:
147147
- A single top-level span for the entire choice sequence
148148
- A span for the choices made by each strategy

hypothesis-python/src/hypothesis/internal/conjecture/shrinker.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1144,7 +1144,7 @@ def try_shrinking_nodes(self, nodes, n):
11441144
# case of this function of preserving from the right instead of
11451145
# preserving from the left. see test_can_shrink_variable_string_draws.
11461146

1147-
(index, attempt_choice_type, attempt_constraints, _attempt_forced) = (
1147+
index, attempt_choice_type, attempt_constraints, _attempt_forced = (
11481148
attempt.misaligned_at
11491149
)
11501150
node = self.nodes[index]
@@ -1291,7 +1291,7 @@ def _node_program(self, chooser, program):
12911291

12921292
# Because we run in a random order we will often find ourselves in the middle
12931293
# of a region where we could run the node program. We thus start by moving
1294-
# left to the beginning of that region if possible in order to to start from
1294+
# left to the beginning of that region if possible in order to start from
12951295
# the beginning of that region.
12961296
def offset_left(k):
12971297
return i - k * n

hypothesis-python/src/hypothesis/strategies/_internal/attrs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ def types_to_strategy(attrib: Attribute, types: Collection[Any]) -> SearchStrate
164164
return st.from_type(typ)
165165
elif types:
166166
# We have a list of tuples of types, and want to find a type
167-
# (or tuple of types) that is a subclass of all of of them.
167+
# (or tuple of types) that is a subclass of all of them.
168168
type_tuples = [k if isinstance(k, tuple) else (k,) for k in types]
169169
# Flatten the list, filter types that would fail validation, and
170170
# sort so that ordering is stable between runs and shrinks well.

0 commit comments

Comments
 (0)