Skip to content

Commit 7be5bd3

Browse files
committed
Sync remaining tests
1 parent 20cea74 commit 7be5bd3

File tree

3 files changed

+5
-18
lines changed

3 files changed

+5
-18
lines changed

test-data/unit/check-classes.test

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3261,7 +3261,10 @@ b.bad = 'a' # E: Incompatible types in assignment (expression has type "str", v
32613261
from typing import Any
32623262

32633263
class Test:
3264-
def __setattr__() -> None: ... # E: Method must have at least one argument. Did you forget the "self" argument? # E: Invalid signature "Callable[[], None]" for "__setattr__"
3264+
def __setattr__() -> None: ... \
3265+
# E: Invalid signature "Callable[[], None]" for "__setattr__" \
3266+
# E: Method must have at least one argument. Did you forget the "self" argument?
3267+
32653268
t = Test()
32663269
t.crash = 'test' # E: Attribute function "__setattr__" with type "Callable[[], None]" does not accept self argument \
32673270
# E: "Test" has no attribute "crash"

test-data/unit/fine-grained.test

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1720,7 +1720,7 @@ from typing import Iterator, Callable, List, Optional
17201720
from a import f
17211721
import a
17221722

1723-
def dec(f: Callable[['A'], Optional[Iterator[int]]]) -> Callable[[int], int]: pass
1723+
def dec(f: Callable[['A'], Optional[Iterator[int]]]) -> Callable[['A', int], int]: pass
17241724

17251725
class A:
17261726
@dec

test-data/unit/semanal-errors.test

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -537,13 +537,6 @@ def f(y: t): x = t
537537
main:4: error: "t" is a type variable and only valid in type context
538538
main:5: error: "t" is a type variable and only valid in type context
539539

540-
[case testMissingSelf]
541-
import typing
542-
class A:
543-
def f(): pass
544-
[out]
545-
main:3: error: Method must have at least one argument. Did you forget the "self" argument?
546-
547540
[case testInvalidBaseClass]
548541
import typing
549542
class A(B): pass
@@ -558,15 +551,6 @@ def f() -> None: super().y
558551
main:2: error: "super" used outside class
559552
main:3: error: "super" used outside class
560553

561-
[case testMissingSelfInMethod]
562-
import typing
563-
class A:
564-
def f() -> None: pass
565-
def g(): pass
566-
[out]
567-
main:3: error: Method must have at least one argument. Did you forget the "self" argument?
568-
main:4: error: Method must have at least one argument. Did you forget the "self" argument?
569-
570554
[case testMultipleMethodDefinition]
571555
import typing
572556
class A:

0 commit comments

Comments
 (0)