Skip to content

Bump mypy to 1.7.0 #11010

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

Merged
merged 1 commit into from
Nov 10, 2023
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion requirements-tests.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ flake8==6.1.0 # must match .pre-commit-config.yaml
flake8-bugbear==23.9.16 # must match .pre-commit-config.yaml
flake8-noqa==1.3.2 # must match .pre-commit-config.yaml
flake8-pyi==23.11.0 # must match .pre-commit-config.yaml
mypy==1.6.1
mypy==1.7.0
pre-commit-hooks==4.5.0 # must match .pre-commit-config.yaml
pytype==2023.10.17; platform_system != "Windows" and python_version < "3.12"
ruff==0.1.4 # must match .pre-commit-config.yaml and tests.yml
Expand Down
7 changes: 1 addition & 6 deletions test_cases/stdlib/check_dataclasses.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,4 @@ def check_other_isdataclass_overloads(x: type, y: object) -> None:
assert_type(dc.fields(y), Tuple[dc.Field[Any], ...])
assert_type(dc.asdict(y), Dict[str, Any])
assert_type(dc.astuple(y), Tuple[Any, ...])

# No longer passes with mypy 1.5.0
# now that mypy gives a tailored signature for dataclasses.replace()
# (https://github.com/python/mypy/issues/15843):
#
# dc.replace(y)
dc.replace(y)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This passes mypy again, following python/mypy#15962 (thanks @ikonst!)