Skip to content

Commit

Permalink
Last infer fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Zac-HD committed Oct 17, 2022
1 parent 87b66ec commit c00ca3e
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 8 deletions.
2 changes: 0 additions & 2 deletions hypothesis-python/src/hypothesis/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
from io import StringIO
from random import Random
from typing import (
TYPE_CHECKING,
Any,
BinaryIO,
Callable,
Expand Down Expand Up @@ -114,7 +113,6 @@
from hypothesis.vendor.pretty import RepresentationPrinter
from hypothesis.version import __version__


TestFunc = TypeVar("TestFunc", bound=Callable)

running_under_pytest = False
Expand Down
4 changes: 2 additions & 2 deletions hypothesis-python/src/hypothesis/extra/django/_impl.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ def from_model(
# want to find any existing row with this primary key and
# overwrite its contents.
kwargs = {field: field_strategies.pop(field)}
kwargs["defaults"] = st.fixed_dictionaries(field_strategies)
kwargs["defaults"] = st.fixed_dictionaries(field_strategies) # type: ignore
return _models_impl(st.builds(m_type.objects.update_or_create, **kwargs))

# The primary key is not generated as part of the strategy, so we
Expand Down Expand Up @@ -217,7 +217,7 @@ def from_form(
return _forms_impl(
st.builds(
partial(form, **form_kwargs),
data=st.fixed_dictionaries(field_strategies),
data=st.fixed_dictionaries(field_strategies), # type: ignore
)
)

Expand Down
1 change: 0 additions & 1 deletion hypothesis-python/src/hypothesis/extra/ghostwriter.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,6 @@
)
from hypothesis.strategies._internal.types import _global_type_lookup, is_generic_type


IMPORT_SECTION = """
# This test code was written by the `hypothesis.extra.ghostwriter` module
# and is provided under the Creative Commons Zero public domain dedication.
Expand Down
6 changes: 3 additions & 3 deletions hypothesis-python/src/hypothesis/internal/compat.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@
except ImportError:
Concatenate, ParamSpec = None, None

if sys.version_info >= (3, 10): # pragma: no cover
from types import EllipsisType as EllipsisType
elif typing.TYPE_CHECKING:
if typing.TYPE_CHECKING:
from builtins import ellipsis as EllipsisType
elif sys.version_info >= (3, 10): # pragma: no cover
from types import EllipsisType as EllipsisType
else:
EllipsisType = type(Ellipsis)

Expand Down

0 comments on commit c00ca3e

Please sign in to comment.