Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion src/frozendict/__init__.pyi
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
from __future__ import annotations

import sys

from typing import (
TypeVar,
overload,
Expand All @@ -19,11 +21,15 @@ except ImportError:
Tuple = tuple
Type = type

if sys.version_info >= (3, 11):
from typing import Self as SelfT
else:
SelfT = TypeVar("SelfT", bound=frozendict[K, V])

K = TypeVar("K")
V = TypeVar("V", covariant=True)
K2 = TypeVar("K2")
V2 = TypeVar("V2", covariant=True)
SelfT = TypeVar("SelfT", bound=frozendict[K, V])

# noinspection PyPep8Naming
class frozendict(Mapping[K, V]):
Expand Down
Loading