mirror of https://github.com/astral-sh/ruff
Minor fixes
This commit is contained in:
parent
31566d67cb
commit
99ecb657f6
|
|
@ -399,7 +399,7 @@ reveal_type(C(1, 1)) # revealed: C[int]
|
||||||
reveal_type(C(1, "string")) # revealed: C[int]
|
reveal_type(C(1, "string")) # revealed: C[int]
|
||||||
reveal_type(C(1, True)) # revealed: C[int]
|
reveal_type(C(1, True)) # revealed: C[int]
|
||||||
|
|
||||||
# error: [invalid-assignment] "Object of type `C[str]` is not assignable to `C[int]"
|
# error: [invalid-assignment] "Object of type `C[str]` is not assignable to `C[int]`"
|
||||||
wrong_innards: C[int] = C("five", 1)
|
wrong_innards: C[int] = C("five", 1)
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -167,7 +167,6 @@ class C[T]:
|
||||||
return y
|
return y
|
||||||
|
|
||||||
c: C[int] = C()
|
c: C[int] = C()
|
||||||
|
|
||||||
reveal_type(c.m(1, "string")) # revealed: Literal["string"]
|
reveal_type(c.m(1, "string")) # revealed: Literal["string"]
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue