Skip to content

Commit af02e2f

Browse files
authored
Make mypy on Python 3.7 happy again (#1158)
1 parent bba9345 commit af02e2f

File tree

3 files changed

+5
-9
lines changed

3 files changed

+5
-9
lines changed

src/neo4j/_async/io/_bolt.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,6 @@
5959

6060

6161
if t.TYPE_CHECKING:
62-
import typing_extensions as te
63-
6462
from ..._api import TelemetryAPI
6563

6664

@@ -263,7 +261,7 @@ def assert_notification_filtering_support(self):
263261

264262
protocol_handlers: t.ClassVar[dict[Version, type[AsyncBolt]]] = {}
265263

266-
def __init_subclass__(cls: type[te.Self], **kwargs: t.Any) -> None:
264+
def __init_subclass__(cls, **kwargs: t.Any) -> None:
267265
if cls.SKIP_REGISTRATION:
268266
super().__init_subclass__(**kwargs)
269267
return

src/neo4j/_sync/io/_bolt.py

Lines changed: 1 addition & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tests/unit/mixed/async_compat/test_network.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,9 @@
3737
TickingDateTimeFactory,
3838
)
3939

40-
TFreezeTime: te.TypeAlias = (
41-
StepTickTimeFactory | TickingDateTimeFactory | FrozenDateTimeFactory
42-
)
40+
TFreezeTime: te.TypeAlias = t.Union[
41+
StepTickTimeFactory, TickingDateTimeFactory, FrozenDateTimeFactory
42+
]
4343

4444

4545
@pytest.fixture

0 commit comments

Comments
 (0)