Skip to content

Commit

Permalink
"TypeVarTuple" and "Unpack" are no more incomplete features
Browse files Browse the repository at this point in the history
  • Loading branch information
David Froger committed Dec 13, 2023
1 parent 7359704 commit 674534b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
3 changes: 1 addition & 2 deletions mypyc/test/test_run.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

from mypy import build
from mypy.errors import CompileError
from mypy.options import TYPE_VAR_TUPLE, UNPACK, Options
from mypy.options import Options
from mypy.test.config import test_temp_dir
from mypy.test.data import DataDrivenTestCase
from mypy.test.helpers import assert_module_equivalence, perform_file_operations
Expand Down Expand Up @@ -194,7 +194,6 @@ def run_case_step(self, testcase: DataDrivenTestCase, incremental_step: int) ->
options.preserve_asts = True
options.allow_empty_bodies = True
options.incremental = self.separate
options.enable_incomplete_feature = [TYPE_VAR_TUPLE, UNPACK]

# Avoid checking modules/packages named 'unchecked', to provide a way
# to test interacting with code we don't have types for.
Expand Down
4 changes: 2 additions & 2 deletions test-data/unit/pythoneval.test
Original file line number Diff line number Diff line change
Expand Up @@ -2007,7 +2007,7 @@ _testInferenceOfDunderDictOnClassObjects.py:4: error: Property "__dict__" define
_testInferenceOfDunderDictOnClassObjects.py:4: error: Incompatible types in assignment (expression has type "Dict[Never, Never]", variable has type "MappingProxyType[str, Any]")

[case testTypeVarTuple]
# flags: --enable-incomplete-feature=TypeVarTuple --enable-incomplete-feature=Unpack --python-version=3.11
# flags: --enable-incomplete-feature=TypeVarTuple --python-version=3.11
from typing import Any, Callable, Unpack, TypeVarTuple

Ts = TypeVarTuple("Ts")
Expand All @@ -2019,7 +2019,7 @@ def call(callback: Callable[[Unpack[Ts]], Any], *args: Unpack[Ts]) -> Any:
...

[case testTypeVarTupleTypingExtensions]
# flags: --enable-incomplete-feature=TypeVarTuple --enable-incomplete-feature=Unpack
# flags: --enable-incomplete-feature=TypeVarTuple
from typing_extensions import Unpack, TypeVarTuple
from typing import Any, Callable

Expand Down

0 comments on commit 674534b

Please sign in to comment.