Skip to content

Commit a808a1e

Browse files
committed
Fix incorrect regster() calls in TestSingleDispatch.test_method_signatures
See #130309 (comment)
1 parent 7968570 commit a808a1e

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

Lib/test/test_functools.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3448,34 +3448,34 @@ def _(item: int, arg: bytes) -> str:
34483448

34493449
def test_method_signatures(self):
34503450
class A:
3451-
def m(self, item, arg: int) -> str:
3451+
def m(self, item: int, arg) -> str:
34523452
return str(item)
34533453
@classmethod
3454-
def cm(cls, item, arg: int) -> str:
3454+
def cm(cls, item: int, arg) -> str:
34553455
return str(item)
34563456
@functools.singledispatchmethod
3457-
def func(self, item, arg: int) -> str:
3457+
def func(self, item: int, arg) -> str:
34583458
return str(item)
34593459
@func.register
3460-
def _(self, item, arg: bytes) -> str:
3460+
def _(self, item: bytes, arg) -> str:
34613461
return str(item)
34623462

34633463
@functools.singledispatchmethod
34643464
@classmethod
3465-
def cls_func(cls, item, arg: int) -> str:
3465+
def cls_func(cls, item: int, arg) -> str:
34663466
return str(arg)
34673467
@func.register
34683468
@classmethod
3469-
def _(cls, item, arg: bytes) -> str:
3469+
def _(cls, item: bytes, arg) -> str:
34703470
return str(item)
34713471

34723472
@functools.singledispatchmethod
34733473
@staticmethod
3474-
def static_func(item, arg: int) -> str:
3474+
def static_func(item: int, arg) -> str:
34753475
return str(arg)
34763476
@func.register
34773477
@staticmethod
3478-
def _(item, arg: bytes) -> str:
3478+
def _(item: bytes, arg) -> str:
34793479
return str(item)
34803480

34813481
self.assertEqual(str(Signature.from_callable(A.func)),

0 commit comments

Comments
 (0)