Skip to content

Commit ab7d78c

Browse files
committed
Add correct GitHub references
1 parent 615c284 commit ab7d78c

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

Lib/functools.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1060,12 +1060,14 @@ def __init__(self, unbound, obj, cls):
10601060
# Set instance attributes which cannot be handled in __getattr__()
10611061
# because they conflict with type descriptors.
10621062
func = unbound.func
1063+
10631064
# Dispatch on the second argument if a generic method turns into
1064-
# a bound method on instance-level access.
1065+
# a bound method on instance-level access. See GH-143535.
10651066
if obj is None and isinstance(func, FunctionType):
10661067
self._skip_bound_arg = True
10671068
else:
10681069
self._skip_bound_arg = False
1070+
10691071
try:
10701072
self.__module__ = func.__module__
10711073
except AttributeError:

Lib/test/test_functools.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3006,7 +3006,7 @@ def static_func(arg: int) -> str:
30063006
self.assertEqual(A().static_func.__name__, 'static_func')
30073007

30083008
def test_method_classlevel_calls(self):
3009-
"""Regression test for GH-144615."""
3009+
"""Regression test for GH-143535."""
30103010
class C:
30113011
@functools.singledispatchmethod
30123012
def generic(self, x: object):

0 commit comments

Comments
 (0)