Skip to content

Commit 46f65df

Browse files
committed
more test changes
1 parent e2c7df8 commit 46f65df

5 files changed

Lines changed: 6 additions & 7 deletions

File tree

mypyc/test-data/irbuild-classes.test

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1051,7 +1051,7 @@ class B(A):
10511051
y = LOL
10521052
z: Optional[str] = None
10531053
b = True
1054-
bogus = None # type: int
1054+
bogus = None # type: int # type: ignore
10551055
[out]
10561056
def A.lol(self):
10571057
self :: __main__.A

mypyc/test-data/run-classes.test

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1126,7 +1126,7 @@ class B(A):
11261126
y = LOL
11271127
z = None # type: Optional[str]
11281128
b = True
1129-
bogus = None # type: int
1129+
bogus = None # type: int # type: ignore
11301130

11311131
def g() -> None:
11321132
a = A()

mypyc/test-data/run-traits.test

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ from mypy_extensions import trait
215215

216216
@trait
217217
class Base:
218-
x = None # type: int
218+
x: int
219219

220220
class Plugin(Base):
221221
def __init__(self) -> None:

test-data/unit/check-optional.test

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -236,13 +236,12 @@ class C:
236236
[case testMultipleAssignmentNoneClassVariableInInit]
237237
from typing import Optional
238238
class C:
239-
x: int
240-
y: str
239+
x, y = None, None # type: int, str # E: Incompatible types in assignment (expression has type "None", variable has type "int") \
240+
# E: Incompatible types in assignment (expression has type "None", variable has type "str")
241241
def __init__(self) -> None:
242242
self.x = None # E: Incompatible types in assignment (expression has type "None", variable has type "int")
243243
self.y = None # E: Incompatible types in assignment (expression has type "None", variable has type "str")
244244
[builtins fixtures/tuple.pyi]
245-
[out]
246245

247246
[case testOverloadWithNone]
248247
from foo import *

test-data/unit/deps.test

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -516,7 +516,7 @@ class A:
516516
from n import A
517517

518518
class B:
519-
x = None # type: A
519+
x = None # type: A # type: ignore
520520
[file n.py]
521521
class A: pass
522522
[out]

0 commit comments

Comments
 (0)