Skip to content

Commit

Permalink
🔨 refactor: update import of override for compatibility with Python 3.11
Browse files Browse the repository at this point in the history
  • Loading branch information
adriamontoto committed Dec 21, 2024
1 parent 1a0e582 commit bc66353
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
7 changes: 6 additions & 1 deletion object_mother_pattern/mothers/primitives/bool_mother.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,12 @@
BoolMother module.
"""

from typing import override
from sys import version_info

if version_info >= (3, 12):
from typing import override # pragma: no cover
else:
from typing_extensions import override # pragma: no cover

from ..base_mother import BaseMother

Expand Down
7 changes: 6 additions & 1 deletion object_mother_pattern/mothers/primitives/integer_mother.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,12 @@
IntegerMother module.
"""

from typing import override
from sys import version_info

if version_info >= (3, 12):
from typing import override # pragma: no cover
else:
from typing_extensions import override # pragma: no cover

from ..base_mother import BaseMother

Expand Down

0 comments on commit bc66353

Please sign in to comment.