Skip to content

Commit

Permalink
Use typing-extensions for Py<3.11
Browse files Browse the repository at this point in the history
  • Loading branch information
nocarryr committed Jun 23, 2024
1 parent ee023b6 commit 33a0f3b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ classifiers = [
dependencies = [
"numpy",
"scipy",
"typing-extensions; python_version<'3.11'"
]

[project.urls]
Expand Down
6 changes: 5 additions & 1 deletion src/lupy/sampling.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
from __future__ import annotations

from typing import TypeVar, NamedTuple, Self
from typing import TypeVar, NamedTuple
try:
from typing_extensions import Self
except ImportError:
from typing import Self
from fractions import Fraction
import threading

Expand Down

0 comments on commit 33a0f3b

Please sign in to comment.