Skip to content

Commit

Permalink
♻️ Refactor import of Annotated for Python 3.8 compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
yezz123 committed May 13, 2024
1 parent 1b0f225 commit 445659c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
7 changes: 6 additions & 1 deletion pydantic_extra_types/dsn.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
from typing import Annotated
import sys

if sys.version_info >= (3, 8):
from typing import Annotated
else:
from typing_extensions import Annotated

from pydantic import UrlConstraints
from pydantic_core import MultiHostUrl, Url
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ quote-style = 'single'

[tool.ruff.lint.per-file-ignores]
'pydantic_extra_types/color.py' = ['E741']
'pydantic_extra_types/dsn.py' = ['UP036']

[tool.coverage.run]
source = ['pydantic_extra_types']
Expand Down

0 comments on commit 445659c

Please sign in to comment.