Skip to content

Commit

Permalink
Override compatibility for <3.12 like mypy docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Athroniaeth committed Jan 27, 2024
1 parent 5a971ef commit efce2a7
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
5 changes: 3 additions & 2 deletions src/pytest_lock/fixtures/lock.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import logging
import sys
import time
from abc import ABC
from datetime import datetime
Expand All @@ -9,9 +10,9 @@
from pytest_lock.fixtures.base import FixtureBase
from pytest_lock.models.cache.lock import Lock

try:
if sys.version_info >= (3, 12):
from typing import override
except ImportError:
else:
from typing_extensions import override


Expand Down
5 changes: 3 additions & 2 deletions src/pytest_lock/fixtures/reversed.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
import sys
import warnings
from abc import ABC
from typing import Any, Callable, Tuple

from pytest_lock.fixtures.base import FixtureBase

try:
if sys.version_info >= (3, 12):
from typing import override
except ImportError:
else:
from typing_extensions import override


Expand Down
5 changes: 3 additions & 2 deletions src/pytest_lock/parser_file/json.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
import json
import sys
from pathlib import Path

from pytest_lock.models.cache.file import FileCache
from pytest_lock.parser_file.base import ParserFile

try:
if sys.version_info >= (3, 12):
from typing import override
except ImportError:
else:
from typing_extensions import override


Expand Down

0 comments on commit efce2a7

Please sign in to comment.