Skip to content

Commit

Permalink
Updated pre-commit modules
Browse files Browse the repository at this point in the history
  • Loading branch information
agronholm committed Nov 14, 2023
1 parent 2fdb177 commit 019835a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@ repos:
- id: trailing-whitespace

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.1.4
rev: v0.1.5
hooks:
- id: ruff
args: [--fix, --show-fixes]
- id: ruff-format

- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.6.1
rev: v1.7.0
hooks:
- id: mypy
additional_dependencies:
Expand Down
6 changes: 3 additions & 3 deletions src/anyio/_core/_sockets.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from os import PathLike, chmod
from pathlib import Path
from socket import AddressFamily, SocketKind
from typing import Literal, Tuple, cast, overload
from typing import Literal, cast, overload

from .. import to_thread
from ..abc import (
Expand Down Expand Up @@ -649,7 +649,7 @@ def convert_ipv6_sockaddr(
"""
# This is more complicated than it should be because of MyPy
if isinstance(sockaddr, tuple) and len(sockaddr) == 4:
host, port, flowinfo, scope_id = cast(Tuple[str, int, int, int], sockaddr)
host, port, flowinfo, scope_id = sockaddr
if scope_id:
# PyPy (as of v7.3.11) leaves the interface name in the result, so
# we discard it and only get the scope ID from the end
Expand All @@ -661,7 +661,7 @@ def convert_ipv6_sockaddr(
else:
return host, port
else:
return cast(Tuple[str, int], sockaddr)
return sockaddr


async def setup_unix_local_socket(
Expand Down

0 comments on commit 019835a

Please sign in to comment.