We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3115fd7 commit f6c102fCopy full SHA for f6c102f
Lib/test/test_functools.py
@@ -3522,15 +3522,16 @@ def test_method_self_annotation(self):
3522
"""See GH-130827."""
3523
class A:
3524
@functools.singledispatchmethod
3525
- def u(self: typing.Self, arg: int | str) -> int | str: ...
+ def u(self: typing.Self, arg: int | str) -> int | str:
3526
+ return None
3527
3528
@u.register
3529
def _(self: typing.Self, arg: int) -> int:
3530
return arg
3531
3532
a = A()
3533
self.assertEqual(a.u(42), 42)
- self.assertEqual(a.u("hello"), "hello")
3534
+ self.assertEqual(a.u("hello"), None)
3535
3536
3537
class CachedCostItem:
0 commit comments