Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Bump mypy from 1.4.1 to 1.5.1. #16300

Merged
merged 4 commits into from
Sep 12, 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
1 change: 1 addition & 0 deletions changelog.d/16300.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Bump mypy from 1.4.1 to 1.5.1.
1 change: 0 additions & 1 deletion mypy.ini
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ warn_unused_ignores = True
# warn_return_any = True
# no_implicit_reexport = True
strict_equality = True
strict_concatenate = True

# Run mypy type checking with the minimum supported Python version to catch new usage
# that isn't backwards-compatible (types, overloads, etc).
Expand Down
68 changes: 29 additions & 39 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 2 additions & 8 deletions synapse/logging/opentracing.py
Original file line number Diff line number Diff line change
Expand Up @@ -991,11 +991,7 @@ def _decorator(func: Callable[P, R]) -> Callable[P, R]:
if not opentracing:
return func

# type-ignore: mypy seems to be confused by the ParamSpecs here.
# I think the problem is https://github.com/python/mypy/issues/12909
Comment on lines -994 to -995
Copy link
Contributor

Choose a reason for hiding this comment

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

Aha, nice to see this get fixed up.

Copy link
Contributor

Choose a reason for hiding this comment

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

Oh, is the point that strict_concatenate was getting in the way of this?

Copy link
Member Author

Choose a reason for hiding this comment

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

Errr, I got a warning saying it was deprecated (and replaced with --extra-checks -- that doesn't seem settable on the command line). But I think you're right.

return _custom_sync_async_decorator(
func, _wrapping_logic # type: ignore[arg-type]
)
return _custom_sync_async_decorator(func, _wrapping_logic)

return _decorator

Expand Down Expand Up @@ -1040,9 +1036,7 @@ def _wrapping_logic(
set_tag(SynapseTags.FUNC_KWARGS, str(kwargs))
yield

# type-ignore: mypy seems to be confused by the ParamSpecs here.
# I think the problem is https://github.com/python/mypy/issues/12909
return _custom_sync_async_decorator(func, _wrapping_logic) # type: ignore[arg-type]
return _custom_sync_async_decorator(func, _wrapping_logic)


@contextlib.contextmanager
Expand Down
Loading