Skip to content

Commit ea2595a

Browse files
committed
update
1 parent 8e8dc22 commit ea2595a

3 files changed

Lines changed: 5 additions & 4 deletions

File tree

test-data/unit/check-abstract.test

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1699,7 +1699,7 @@ class Proto(Protocol):
16991699
def foo(t: Callable[..., Proto]):
17001700
t()
17011701

1702-
foo(Proto) # E: Argument 1 to "foo" has incompatible type "Type[Proto]"; expected "Callable[..., Proto]"
1702+
foo(Proto) # E: Argument 1 to "foo" has incompatible type "type[Proto]"; expected "Callable[..., Proto]"
17031703

17041704
class Abstract(abc.ABC):
17051705
@abc.abstractmethod
@@ -1708,4 +1708,4 @@ class Abstract(abc.ABC):
17081708
def bar(t: Callable[..., Abstract]):
17091709
t()
17101710

1711-
bar(Abstract) # E: Argument 1 to "bar" has incompatible type "Type[Abstract]"; expected "Callable[..., Abstract]"
1711+
bar(Abstract) # E: Argument 1 to "bar" has incompatible type "type[Abstract]"; expected "Callable[..., Abstract]"

test-data/unit/check-functools.test

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -595,8 +595,9 @@ def f1(cls: type[A]) -> None:
595595
def f2() -> None:
596596
A() # E: Cannot instantiate abstract class "A" with abstract attribute "method"
597597
partial_cls = partial(A) # E: Cannot instantiate abstract class "A" with abstract attribute "method" \
598-
# E: Argument 1 to "partial" has incompatible type "Type[A]"; expected "Callable[..., A]"
598+
# E: Argument 1 to "partial" has incompatible type "type[A]"; expected "Callable[..., A]"
599599
partial_cls() # E: Cannot instantiate abstract class "A" with abstract attribute "method"
600+
600601
[builtins fixtures/tuple.pyi]
601602

602603
[case testFunctoolsPartialSelfType]

test-data/unit/check-optional.test

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1369,5 +1369,5 @@ class NotSet: ...
13691369
class Task:
13701370
def with_opt(self, trn: CP | type[NotSet] | None):
13711371
if trn is not NotSet:
1372-
reveal_type(trn) # N: Revealed type is "Union[__main__.CP, Type[__main__.NotSet], None]"
1372+
reveal_type(trn) # N: Revealed type is "__main__.CP | type[__main__.NotSet] | None"
13731373
[builtins fixtures/tuple.pyi]

0 commit comments

Comments
 (0)