Skip to content

Commit

Permalink
Updated pre-commit modules and fixed new mypy errors
Browse files Browse the repository at this point in the history
  • Loading branch information
agronholm committed Nov 13, 2022
1 parent a04691c commit 732e31d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 8 deletions.
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ repos:
exclude: "docs/conf.py"

- repo: https://github.com/asottile/pyupgrade
rev: v3.2.0
rev: v3.2.2
hooks:
- id: pyupgrade
args: [ "--py37-plus", "--keep-mock" ]
Expand All @@ -40,7 +40,7 @@ repos:
- id: pyproject-flake8

- repo: https://github.com/pre-commit/mirrors-mypy
rev: v0.982
rev: v0.990
hooks:
- id: mypy
additional_dependencies: [ "pytest", "trio-typing", "packaging" ]
Expand Down
6 changes: 3 additions & 3 deletions src/anyio/_backends/_trio.py
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ def after_run(self) -> None:
super().after_run()


current_default_worker_process_limiter: RunVar = RunVar(
current_default_worker_process_limiter: trio.lowlevel.RunVar = RunVar(
"current_default_worker_process_limiter"
)

Expand Down Expand Up @@ -666,7 +666,7 @@ def statistics(self) -> CapacityLimiterStatistics:
)


_capacity_limiter_wrapper: RunVar = RunVar("_capacity_limiter_wrapper")
_capacity_limiter_wrapper: trio.lowlevel.RunVar = RunVar("_capacity_limiter_wrapper")


#
Expand Down Expand Up @@ -1005,7 +1005,7 @@ async def create_unix_datagram_socket(
...

@classmethod
async def create_unix_datagram_socket( # type: ignore[override]
async def create_unix_datagram_socket(
cls, raw_socket: socket.socket, remote_path: str | None
) -> abc.UNIXDatagramSocket | abc.ConnectedUNIXDatagramSocket:
trio_socket = trio.socket.from_stdlib_socket(raw_socket)
Expand Down
4 changes: 1 addition & 3 deletions src/anyio/streams/tls.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,7 @@ async def wrap(

# Re-enable detection of unexpected EOFs if it was disabled by Python
if hasattr(ssl, "OP_IGNORE_UNEXPECTED_EOF"):
ssl_context.options ^= (
ssl.OP_IGNORE_UNEXPECTED_EOF # type: ignore[attr-defined]
)
ssl_context.options ^= ssl.OP_IGNORE_UNEXPECTED_EOF

bio_in = ssl.MemoryBIO()
bio_out = ssl.MemoryBIO()
Expand Down

0 comments on commit 732e31d

Please sign in to comment.