Skip to content

Commit 3e3e69d

Browse files
authored
python3.11 and bumps (#63)
Co-authored-by: KotlinIsland <[email protected]>
1 parent da37631 commit 3e3e69d

File tree

3 files changed

+9
-6
lines changed

3 files changed

+9
-6
lines changed

.github/workflows/check.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
runs-on: ubuntu-latest
1111
strategy:
1212
matrix:
13-
python-version: ["3.7", "3.8", "3.9", "3.10"]
13+
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11-dev"]
1414

1515
steps:
1616
- uses: actions/checkout@v2

basedtyping/__init__.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,12 @@
2424

2525
if not TYPE_CHECKING:
2626
# TODO: remove the TYPE_CHECKING block once these are typed in basedtypeshed
27-
from typing import _collect_type_vars, _tp_cache
27+
from typing import _tp_cache
28+
29+
if sys.version_info >= (3, 11):
30+
from typing import _collect_parameters
31+
else:
32+
from typing import _collect_type_vars as _collect_parameters
2833

2934

3035
if TYPE_CHECKING:
@@ -317,9 +322,7 @@ def __class_getitem__( # type: ignore[no-any-decorated]
317322
_type_convert(t) for t in items # type: ignore[unused-ignore, no-any-expr]
318323
),
319324
_orig_type_vars=orig_type_vars,
320-
__type_vars__=_collect_type_vars( # type: ignore[name-defined, no-any-expr]
321-
items, cast(type, TypeVar)
322-
),
325+
__type_vars__=_collect_parameters(items), # type: ignore[name-defined, no-any-expr]
323326
),
324327
)
325328
# can't set it in the dict above otherwise __init_subclass__ overwrites it

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ authors = [
55
]
66
description = "Utilities for basedmypy"
77
name = "basedtyping"
8-
version = "0.0.1"
8+
version = "0.0.2"
99

1010
[tool.poetry.dependencies]
1111
python = "^3.7.2"

0 commit comments

Comments
 (0)