Skip to content

Commit

Permalink
Merge pull request #181 from p1c2u/fix/mypy-typing-module-versions-fix
Browse files Browse the repository at this point in the history
mypy typing module version fix
  • Loading branch information
p1c2u committed Oct 7, 2022
2 parents 81ee2aa + 8eae988 commit bb56635
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions openapi_spec_validator/validation/protocols.py
Original file line number Diff line number Diff line change
@@ -1,19 +1,16 @@
import sys
from typing import TYPE_CHECKING
from typing import Any
from typing import Hashable
from typing import Iterator
from typing import Mapping

if TYPE_CHECKING:
if sys.version_info >= (3, 8):
from typing import Protocol
from typing import runtime_checkable
else:
from typing_extensions import Protocol
from typing_extensions import runtime_checkable
else:
try:
from typing import Protocol
from typing import runtime_checkable
except ImportError:
from typing_extensions import Protocol
from typing_extensions import runtime_checkable

from openapi_spec_validator.validation.exceptions import OpenAPIValidationError

Expand Down

0 comments on commit bb56635

Please sign in to comment.