Skip to content

Commit 5e1e26e

Browse files
authored
Change testParamSpecApplyConcatenateTwice test (#13907)
It was very confusing, because `int` and `str` were messed up.
1 parent abc9d15 commit 5e1e26e

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

test-data/unit/check-parameter-specification.test

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -757,24 +757,24 @@ class C(Generic[P]):
757757
# think PhantomData<T> from rust
758758
phantom: Optional[Callable[P, None]]
759759

760-
def add_str(self) -> C[Concatenate[int, P]]:
761-
return C[Concatenate[int, P]]()
762-
763-
def add_int(self) -> C[Concatenate[str, P]]:
760+
def add_str(self) -> C[Concatenate[str, P]]:
764761
return C[Concatenate[str, P]]()
765762

763+
def add_int(self) -> C[Concatenate[int, P]]:
764+
return C[Concatenate[int, P]]()
765+
766766
def f(c: C[P]) -> None:
767767
reveal_type(c) # N: Revealed type is "__main__.C[P`-1]"
768768

769769
n1 = c.add_str()
770-
reveal_type(n1) # N: Revealed type is "__main__.C[[builtins.int, **P`-1]]"
770+
reveal_type(n1) # N: Revealed type is "__main__.C[[builtins.str, **P`-1]]"
771771
n2 = n1.add_int()
772-
reveal_type(n2) # N: Revealed type is "__main__.C[[builtins.str, builtins.int, **P`-1]]"
772+
reveal_type(n2) # N: Revealed type is "__main__.C[[builtins.int, builtins.str, **P`-1]]"
773773

774774
p1 = c.add_int()
775-
reveal_type(p1) # N: Revealed type is "__main__.C[[builtins.str, **P`-1]]"
775+
reveal_type(p1) # N: Revealed type is "__main__.C[[builtins.int, **P`-1]]"
776776
p2 = p1.add_str()
777-
reveal_type(p2) # N: Revealed type is "__main__.C[[builtins.int, builtins.str, **P`-1]]"
777+
reveal_type(p2) # N: Revealed type is "__main__.C[[builtins.str, builtins.int, **P`-1]]"
778778
[builtins fixtures/paramspec.pyi]
779779

780780
[case testParamSpecLiteralJoin]

0 commit comments

Comments
 (0)