diff --git a/hypothesis-python/src/hypothesis/extra/_array_helpers.py b/hypothesis-python/src/hypothesis/extra/_array_helpers.py index 32135fd87a..93b88408ab 100644 --- a/hypothesis-python/src/hypothesis/extra/_array_helpers.py +++ b/hypothesis-python/src/hypothesis/extra/_array_helpers.py @@ -275,10 +275,10 @@ def broadcastable_shapes( # We are unsure if gufuncs allow frozen dimensions to be optional, but it's # easy enough to support here - and so we will unless we learn otherwise. _DIMENSION = r"\w+\??" # Note that \w permits digits too! -_SHAPE = r"\((?:{0}(?:,{0})".format(_DIMENSION) + r"{0,31})?\)" -_ARGUMENT_LIST = "{0}(?:,{0})*".format(_SHAPE) +_SHAPE = rf"\((?:{_DIMENSION}(?:,{_DIMENSION})" + r"{0,31})?\)" +_ARGUMENT_LIST = f"{_SHAPE}(?:,{_SHAPE})*" _SIGNATURE = rf"^{_ARGUMENT_LIST}->{_SHAPE}$" -_SIGNATURE_MULTIPLE_OUTPUT = r"^{0}->{0}$".format(_ARGUMENT_LIST) +_SIGNATURE_MULTIPLE_OUTPUT = rf"^{_ARGUMENT_LIST}->{_ARGUMENT_LIST}$" class _GUfuncSig(NamedTuple): diff --git a/hypothesis-python/src/hypothesis/stateful.py b/hypothesis-python/src/hypothesis/stateful.py index d7a2a18f02..cc6f29af98 100644 --- a/hypothesis-python/src/hypothesis/stateful.py +++ b/hypothesis-python/src/hypothesis/stateful.py @@ -220,11 +220,9 @@ class StateMachineMeta(type): def __setattr__(cls, name, value): if name == "settings" and isinstance(value, Settings): raise AttributeError( - ( - "Assigning {cls}.settings = {value} does nothing. Assign " - "to {cls}.TestCase.settings, or use @{value} as a decorator " - "on the {cls} class." - ).format(cls=cls.__name__, value=value) + f"Assigning {cls.__name__}.settings = {value} does nothing. Assign " + f"to {cls.__name__}.TestCase.settings, or use @{value} as a decorator " + f"on the {cls.__name__} class." ) return super().__setattr__(name, value) @@ -908,10 +906,7 @@ def __init__(self, machine): ) def __repr__(self): - return "{}(machine={}({{...}}))".format( - self.__class__.__name__, - self.machine.__class__.__name__, - ) + return f"{self.__class__.__name__}(machine={self.machine.__class__.__name__}({{...}}))" def do_draw(self, data): if not any(self.is_valid(rule) for rule in self.rules): diff --git a/hypothesis-python/src/hypothesis/strategies/_internal/flatmapped.py b/hypothesis-python/src/hypothesis/strategies/_internal/flatmapped.py index b1fca8f883..49cb4e0cdd 100644 --- a/hypothesis-python/src/hypothesis/strategies/_internal/flatmapped.py +++ b/hypothesis-python/src/hypothesis/strategies/_internal/flatmapped.py @@ -23,10 +23,7 @@ def calc_is_empty(self, recur): def __repr__(self): if not hasattr(self, "_cached_repr"): - self._cached_repr = "{!r}.flatmap({})".format( - self.flatmapped_strategy, - get_pretty_function_description(self.expand), - ) + self._cached_repr = f"{self.flatmapped_strategy!r}.flatmap({get_pretty_function_description(self.expand)})" return self._cached_repr def do_draw(self, data): diff --git a/hypothesis-python/src/hypothesis/strategies/_internal/strategies.py b/hypothesis-python/src/hypothesis/strategies/_internal/strategies.py index 9acb3f9d4a..3835091a40 100644 --- a/hypothesis-python/src/hypothesis/strategies/_internal/strategies.py +++ b/hypothesis-python/src/hypothesis/strategies/_internal/strategies.py @@ -810,10 +810,7 @@ def calc_is_cacheable(self, recur): def __repr__(self): if not hasattr(self, "_cached_repr"): - self._cached_repr = "{!r}.map({})".format( - self.mapped_strategy, - get_pretty_function_description(self.pack), - ) + self._cached_repr = f"{self.mapped_strategy!r}.map({get_pretty_function_description(self.pack)})" return self._cached_repr def do_validate(self): diff --git a/hypothesis-python/src/hypothesis/vendor/tlds-alpha-by-domain.txt b/hypothesis-python/src/hypothesis/vendor/tlds-alpha-by-domain.txt index 2c55d54205..53f55386fa 100644 --- a/hypothesis-python/src/hypothesis/vendor/tlds-alpha-by-domain.txt +++ b/hypothesis-python/src/hypothesis/vendor/tlds-alpha-by-domain.txt @@ -1,4 +1,4 @@ -# Version 2023062400, Last Updated Sat Jun 24 07:07:01 2023 UTC +# Version 2023081200, Last Updated Sat Aug 12 07:07:01 2023 UTC AAA AARP ABB @@ -558,7 +558,6 @@ HOSPITAL HOST HOSTING HOT -HOTELES HOTELS HOTMAIL HOUSE @@ -803,7 +802,6 @@ MTR MU MUSEUM MUSIC -MUTUAL MV MW MX @@ -844,7 +842,6 @@ NISSAY NL NO NOKIA -NORTHWESTERNMUTUAL NORTON NOW NOWRUZ @@ -890,7 +887,6 @@ PARS PARTNERS PARTS PARTY -PASSAGENS PAY PCCW PE @@ -1162,7 +1158,6 @@ THEATRE TIAA TICKETS TIENDA -TIFFANY TIPS TIRES TIROL @@ -1253,7 +1248,6 @@ VOTING VOTO VOYAGE VU -VUELOS WALES WALMART WALTER diff --git a/hypothesis-python/tests/common/setup.py b/hypothesis-python/tests/common/setup.py index b75c79ad50..193e67b11b 100644 --- a/hypothesis-python/tests/common/setup.py +++ b/hypothesis-python/tests/common/setup.py @@ -48,9 +48,9 @@ def run(): v = getattr(x, s.name) # Check if it has a dynamically defined default and if so skip comparison. if getattr(settings, s.name).show_default: - assert v == s.default, "({!r} == x.{}) != (s.{} == {!r})".format( - v, s.name, s.name, s.default - ) + assert ( + v == s.default + ), f"({v!r} == x.{s.name}) != (s.{s.name} == {s.default!r})" settings.register_profile( "default", diff --git a/requirements/coverage.txt b/requirements/coverage.txt index 9547224c68..9ff3cd3f26 100644 --- a/requirements/coverage.txt +++ b/requirements/coverage.txt @@ -4,17 +4,17 @@ # # ./build.sh upgrade-requirements # -async-timeout==4.0.2 +async-timeout==4.0.3 # via redis attrs==23.1.0 # via hypothesis (hypothesis-python/setup.py) black @ git+https://github.com/psf/black.git@eedfc3832290b3a32825b3c0f2dfa3f3d7ee9d1c # via -r requirements/coverage.in -click==8.1.4 +click==8.1.6 # via # -r requirements/coverage.in # black -coverage==7.2.7 +coverage==7.3.0 # via -r requirements/coverage.in dpcontracts==0.6.0 # via -r requirements/coverage.in @@ -22,13 +22,13 @@ exceptiongroup==1.1.2 ; python_version < "3.11" # via # hypothesis (hypothesis-python/setup.py) # pytest -execnet==2.0.0 +execnet==2.0.2 # via pytest-xdist -fakeredis==2.16.0 +fakeredis==2.17.0 # via -r requirements/coverage.in iniconfig==2.0.0 # via pytest -lark==1.1.5 +lark==1.1.7 # via -r requirements/coverage.in libcst==1.0.1 # via -r requirements/coverage.in @@ -36,7 +36,7 @@ mypy-extensions==1.0.0 # via # black # typing-inspect -numpy==1.25.0 +numpy==1.25.2 # via # -r requirements/coverage.in # pandas @@ -46,11 +46,11 @@ packaging==23.1 # pytest pandas==2.0.3 # via -r requirements/coverage.in -pathspec==0.11.1 +pathspec==0.11.2 # via black pexpect==4.8.0 # via -r requirements/test.in -platformdirs==3.8.1 +platformdirs==3.10.0 # via black pluggy==1.2.0 # via pytest @@ -70,7 +70,7 @@ pytz==2023.3 # via # -r requirements/coverage.in # pandas -pyyaml==6.0 +pyyaml==6.0.1 # via libcst redis==4.6.0 # via fakeredis diff --git a/requirements/fuzzing.txt b/requirements/fuzzing.txt index ff571cf0b2..83c40a3e35 100644 --- a/requirements/fuzzing.txt +++ b/requirements/fuzzing.txt @@ -6,7 +6,7 @@ # ansi2html==1.8.0 # via dash -async-timeout==4.0.2 +async-timeout==4.0.3 # via redis attrs==23.1.0 # via @@ -17,17 +17,17 @@ black @ git+https://github.com/psf/black.git@eedfc3832290b3a32825b3c0f2dfa3f3d7e # -r requirements/coverage.in # hypofuzz # hypothesis -certifi==2023.5.7 +certifi==2023.7.22 # via requests charset-normalizer==3.2.0 # via requests -click==8.1.4 +click==8.1.6 # via # -r requirements/coverage.in # black # flask # hypothesis -coverage==7.2.7 +coverage==7.3.0 # via # -r requirements/coverage.in # hypofuzz @@ -46,15 +46,15 @@ exceptiongroup==1.1.2 ; python_version < "3.11" # hypothesis # hypothesis (hypothesis-python/setup.py) # pytest -execnet==2.0.0 +execnet==2.0.2 # via pytest-xdist -fakeredis==2.16.0 +fakeredis==2.17.0 # via -r requirements/coverage.in flask==2.2.5 # via dash git+https://github.com/Zac-HD/hypofuzz.git # via -r requirements/fuzzing.in -hypothesis[cli]==6.80.1 +hypothesis[cli]==6.82.3 # via hypofuzz idna==3.4 # via requests @@ -64,7 +64,7 @@ itsdangerous==2.1.2 # via flask jinja2==3.1.2 # via flask -lark==1.1.5 +lark==1.1.7 # via -r requirements/coverage.in libcst==1.0.1 # via @@ -82,9 +82,9 @@ mypy-extensions==1.0.0 # via # black # typing-inspect -nest-asyncio==1.5.6 +nest-asyncio==1.5.7 # via dash -numpy==1.25.0 +numpy==1.25.2 # via # -r requirements/coverage.in # pandas @@ -97,13 +97,13 @@ pandas==2.0.3 # via # -r requirements/coverage.in # hypofuzz -pathspec==0.11.1 +pathspec==0.11.2 # via black pexpect==4.8.0 # via -r requirements/test.in -platformdirs==3.8.1 +platformdirs==3.10.0 # via black -plotly==5.15.0 +plotly==5.16.0 # via dash pluggy==1.2.0 # via pytest @@ -111,7 +111,7 @@ psutil==5.9.5 # via hypofuzz ptyprocess==0.7.0 # via pexpect -pygments==2.15.1 +pygments==2.16.1 # via rich pytest==7.4.0 # via @@ -128,7 +128,7 @@ pytz==2023.3 # via # -r requirements/coverage.in # pandas -pyyaml==6.0 +pyyaml==6.0.1 # via libcst redis==4.6.0 # via fakeredis @@ -138,7 +138,7 @@ requests==2.31.0 # hypofuzz retrying==1.3.4 # via dash -rich==13.4.2 +rich==13.5.2 # via hypothesis six==1.16.0 # via @@ -165,7 +165,7 @@ typing-inspect==0.9.0 # via libcst tzdata==2023.3 # via pandas -urllib3==2.0.3 +urllib3==2.0.4 # via requests werkzeug==2.2.3 # via diff --git a/requirements/test.txt b/requirements/test.txt index 3b78d61549..7f6df79fcc 100644 --- a/requirements/test.txt +++ b/requirements/test.txt @@ -10,7 +10,7 @@ exceptiongroup==1.1.2 ; python_version < "3.11" # via # hypothesis (hypothesis-python/setup.py) # pytest -execnet==2.0.0 +execnet==2.0.2 # via pytest-xdist iniconfig==2.0.0 # via pytest diff --git a/requirements/tools.txt b/requirements/tools.txt index bd0225ec9c..c2f27a7d54 100644 --- a/requirements/tools.txt +++ b/requirements/tools.txt @@ -20,7 +20,7 @@ backcall==0.2.0 # via ipython beautifulsoup4==4.12.2 # via sphinx-codeautolink -black==23.3.0 +black==23.7.0 # via shed bleach==6.0.0 # via readme-renderer @@ -28,15 +28,15 @@ build==0.10.0 # via pip-tools cachetools==5.3.1 # via tox -certifi==2023.5.7 +certifi==2023.7.22 # via requests cffi==1.15.1 # via cryptography -chardet==5.1.0 +chardet==5.2.0 # via tox charset-normalizer==3.2.0 # via requests -click==8.1.4 +click==8.1.6 # via # black # pip-tools @@ -46,18 +46,18 @@ colorama==0.4.6 # via tox com2ann==0.3.0 # via shed -coverage==7.2.7 +coverage==7.3.0 # via -r requirements/tools.in -cryptography==41.0.1 +cryptography==41.0.3 # via # secretstorage # types-pyopenssl # types-redis decorator==5.1.1 # via ipython -distlib==0.3.6 +distlib==0.3.7 # via virtualenv -django==4.2.3 +django==4.2.4 # via -r requirements/tools.in docutils==0.18.1 # via @@ -91,9 +91,9 @@ ipython==8.14.0 # via -r requirements/tools.in isort==5.12.0 # via shed -jaraco-classes==3.2.3 +jaraco-classes==3.3.0 # via keyring -jedi==0.18.2 +jedi==0.19.0 # via ipython jeepney==0.8.0 # via @@ -103,7 +103,7 @@ jinja2==3.1.2 # via sphinx keyring==24.2.0 # via twine -lark==1.1.5 +lark==1.1.7 # via -r requirements/tools.in libcst==1.0.1 # via @@ -117,9 +117,9 @@ matplotlib-inline==0.1.6 # via ipython mdurl==0.1.2 # via markdown-it-py -more-itertools==9.1.0 +more-itertools==10.1.0 # via jaraco-classes -mypy==1.4.1 +mypy==1.5.0 # via -r requirements/tools.in mypy-extensions==1.0.0 # via @@ -138,17 +138,17 @@ packaging==23.1 # tox parso==0.8.3 # via jedi -pathspec==0.11.1 +pathspec==0.11.2 # via black pexpect==4.8.0 # via ipython pickleshare==0.7.5 # via ipython -pip-tools==6.14.0 +pip-tools==7.3.0 # via -r requirements/tools.in pkginfo==1.9.6 # via twine -platformdirs==3.8.1 +platformdirs==3.10.0 # via # black # tox @@ -165,9 +165,9 @@ pure-eval==0.2.2 # via stack-data pycparser==2.21 # via cffi -pyflakes==3.0.1 +pyflakes==3.1.0 # via autoflake -pygments==2.15.1 +pygments==2.16.1 # via # ipython # readme-renderer @@ -177,15 +177,15 @@ pyproject-api==1.5.3 # via tox pyproject-hooks==1.0.0 # via build -pyright==1.1.316 +pyright==1.1.322 # via -r requirements/tools.in pytest==7.4.0 # via -r requirements/tools.in python-dateutil==2.8.2 # via -r requirements/tools.in -pyupgrade==3.8.0 +pyupgrade==3.10.1 # via shed -pyyaml==6.0 +pyyaml==6.0.1 # via libcst readme-renderer==40.0 # via twine @@ -201,9 +201,9 @@ restructuredtext-lint==1.4.0 # via -r requirements/tools.in rfc3986==2.0.0 # via twine -rich==13.4.2 +rich==13.5.2 # via twine -ruff==0.0.277 +ruff==0.0.284 # via -r requirements/tools.in secretstorage==3.3.3 # via keyring @@ -226,7 +226,12 @@ sphinx==6.2.1 # sphinx-codeautolink # sphinx-hoverxref # sphinx-rtd-theme + # sphinxcontrib-applehelp + # sphinxcontrib-devhelp + # sphinxcontrib-htmlhelp # sphinxcontrib-jquery + # sphinxcontrib-qthelp + # sphinxcontrib-serializinghtml sphinx-codeautolink==0.15.0 # via -r requirements/tools.in sphinx-hoverxref==1.3.0 @@ -235,11 +240,11 @@ sphinx-rtd-theme==1.2.2 # via -r requirements/tools.in sphinx-selective-exclude==1.0.3 # via -r requirements/tools.in -sphinxcontrib-applehelp==1.0.4 +sphinxcontrib-applehelp==1.0.6 # via sphinx -sphinxcontrib-devhelp==1.0.2 +sphinxcontrib-devhelp==1.0.4 # via sphinx -sphinxcontrib-htmlhelp==2.0.1 +sphinxcontrib-htmlhelp==2.0.3 # via sphinx sphinxcontrib-jquery==4.1 # via @@ -247,15 +252,15 @@ sphinxcontrib-jquery==4.1 # sphinx-rtd-theme sphinxcontrib-jsmath==1.0.1 # via sphinx -sphinxcontrib-qthelp==1.0.3 +sphinxcontrib-qthelp==1.0.5 # via sphinx -sphinxcontrib-serializinghtml==1.1.5 +sphinxcontrib-serializinghtml==1.1.7 # via sphinx sqlparse==0.4.4 # via django stack-data==0.6.2 # via ipython -tokenize-rt==5.1.0 +tokenize-rt==5.2.0 # via pyupgrade tomli==2.0.1 # via @@ -268,7 +273,7 @@ tomli==2.0.1 # pyproject-hooks # pytest # tox -tox==4.6.4 +tox==4.8.0 # via -r requirements/tools.in traitlets==5.9.0 # via @@ -280,11 +285,11 @@ types-click==7.1.8 # via -r requirements/tools.in types-pkg-resources==0.1.3 # via -r requirements/tools.in -types-pyopenssl==23.2.0.1 +types-pyopenssl==23.2.0.2 # via types-redis types-pytz==2023.3.0.0 # via -r requirements/tools.in -types-redis==4.6.0.2 +types-redis==4.6.0.3 # via -r requirements/tools.in typing-extensions==4.7.1 # via @@ -295,23 +300,23 @@ typing-extensions==4.7.1 # typing-inspect typing-inspect==0.9.0 # via libcst -urllib3==2.0.3 +urllib3==2.0.4 # via # requests # twine -virtualenv==20.23.1 +virtualenv==20.24.3 # via tox wcwidth==0.2.6 # via prompt-toolkit webencodings==0.5.1 # via bleach -wheel==0.40.0 +wheel==0.41.1 # via pip-tools -zipp==3.15.0 +zipp==3.16.2 # via importlib-metadata # The following packages are considered to be unsafe in a requirements file: -pip==23.1.2 +pip==23.2.1 # via pip-tools setuptools==68.0.0 # via