Skip to content

Commit

Permalink
Updated mypy to version 1.7.0 (#164)
Browse files Browse the repository at this point in the history
  • Loading branch information
francis-clairicia authored Nov 12, 2023
1 parent 52006d3 commit cd7d85e
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 20 deletions.
28 changes: 14 additions & 14 deletions pdm.lock

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

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ format = [
"black>=22.6.0",
]
mypy = [
"mypy~=1.6.0",
"mypy~=1.7.0",
"types-cryptography>=3.3.23.2",
"msgpack-types>=0.2.0",
]
Expand Down
4 changes: 2 additions & 2 deletions src/easynetwork/api_async/server/tcp.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ def _value_or_default(value: float | None, default: float) -> float:
self.__is_shutdown.set()
self.__shutdown_asked: bool = False
self.__max_recv_size: int = max_recv_size
self.__servers_tasks: deque[Task[NoReturn]] = deque() # type: ignore[assignment]
self.__servers_tasks: deque[Task[NoReturn]] = deque()
self.__mainloop_task: Task[NoReturn] | None = None
self.__logger: logging.Logger = logger or logging.getLogger(__name__)
self.__client_connection_log_level: int
Expand Down Expand Up @@ -534,7 +534,7 @@ def __check_closed(self) -> None:
@property
def extra_attributes(self) -> Mapping[Any, Callable[[], Any]]:
client = self.__client
return client.extra_attributes | {
return dict(client.extra_attributes) | {
INETClientAttribute.socket: lambda: self.__proxy,
INETClientAttribute.local_address: lambda: new_socket_address(
client.extra(INETSocketAttribute.sockname),
Expand Down
4 changes: 2 additions & 2 deletions src/easynetwork/api_async/server/udp.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ def __init__(
self.__is_shutdown: IEvent = self.__backend.create_event()
self.__is_shutdown.set()
self.__shutdown_asked: bool = False
self.__servers_tasks: deque[Task[NoReturn]] = deque() # type: ignore[assignment]
self.__servers_tasks: deque[Task[NoReturn]] = deque()
self.__mainloop_task: Task[NoReturn] | None = None
self.__logger: logging.Logger = logger or logging.getLogger(__name__)
self.__clients_cache: defaultdict[
Expand Down Expand Up @@ -409,7 +409,7 @@ def extra_attributes(self) -> Mapping[Any, Callable[[], Any]]:
return {}
server = server_ref
del server_ref
return server.extra_attributes | {
return dict(server.extra_attributes) | {
INETClientAttribute.socket: lambda: self.__socket_proxy,
INETClientAttribute.local_address: lambda: new_socket_address(
server.extra(INETSocketAttribute.sockname),
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ allowlist_externals =
setenv =
{[base]setenv}
MYPY_CACHE_DIR = {envtmpdir}{/}.mypy_cache
MYPY_OPTS = --config-file {toxinidir}{/}pyproject.toml --new-type-inference
MYPY_OPTS = --config-file {toxinidir}{/}pyproject.toml
commands_pre =
{[pdm]sync} --prod --group=":all"
{[pdm]sync} --dev --group=mypy
Expand Down

0 comments on commit cd7d85e

Please sign in to comment.