Skip to content

Commit 7ac57e7

Browse files
style: manual 3.9 fixes
1 parent 40a41b7 commit 7ac57e7

File tree

3 files changed

+3
-5
lines changed

3 files changed

+3
-5
lines changed

disnake/ext/mypy_plugin/__init__.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
# SPDX-License-Identifier: MIT
22

3-
import typing as t
43

54
from mypy.plugin import Plugin
65

disnake/ext/tasks/__init__.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,8 @@
1313
Any,
1414
Callable,
1515
Generic,
16-
List,
1716
Optional,
1817
Protocol,
19-
Type,
2018
TypeVar,
2119
Union,
2220
cast,

tests/helpers.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
import functools
55
import inspect
66
import types
7-
from typing import TYPE_CHECKING, Callable, ContextManager, Optional, TypeVar
7+
from collections.abc import AbstractContextManager
8+
from typing import TYPE_CHECKING, Callable, Optional, TypeVar
89
from unittest import mock
910

1011
if TYPE_CHECKING:
@@ -28,7 +29,7 @@ def reveal_type(*args, **kwargs) -> None:
2829
CallableT = TypeVar("CallableT", bound=Callable)
2930

3031

31-
class freeze_time(ContextManager):
32+
class freeze_time(AbstractContextManager):
3233
"""Helper class that freezes time at the given datetime by patching `datetime.now`.
3334
If no datetime is provided, defaults to the current time.
3435
Can be used as a sync context manager or decorator for sync/async functions.

0 commit comments

Comments
 (0)