Skip to content

Commit 98735f6

Browse files
committed
fix signature error in test_inspect.py
This is temporary as which module should the function be put is not determined yet in the discourse discussion.
1 parent 671185e commit 98735f6

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

Lib/test/test_inspect/test_inspect.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6154,14 +6154,18 @@ def test_builtins_have_signatures(self):
61546154
methods_no_signature, methods_unsupported_signature)
61556155

61566156
def test_types_module_has_signatures(self):
6157+
no_signature = set()
6158+
# These need PEP 457 groups
6159+
needs_groups = {'lookup_special'}
6160+
no_signature |= needs_groups
61576161
unsupported_signature = {'CellType'}
61586162
methods_no_signature = {
61596163
'AsyncGeneratorType': {'athrow'},
61606164
'CoroutineType': {'throw'},
61616165
'GeneratorType': {'throw'},
61626166
'FrameLocalsProxyType': {'setdefault', 'pop', 'get'},
61636167
}
6164-
self._test_module_has_signatures(types,
6168+
self._test_module_has_signatures(types, no_signature,
61656169
unsupported_signature=unsupported_signature,
61666170
methods_no_signature=methods_no_signature)
61676171

Modules/_typesmodule.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ PyDoc_STRVAR(lookup_special_doc,
1414
\n\
1515
Lookup method name `name` on `object` skipping the instance dictionary.\n\
1616
`name` must be a string. If the named special attribute does not\n\
17-
exist,`default` is returned if provided, otherwise AttributeError is raised.");
17+
exist,`default` is returned if provided, otherwise `AttributeError` is raised.");
1818

1919
static PyObject *
2020
_types_lookup_special_impl(PyObject *self, PyObject *const *args, Py_ssize_t nargs)

0 commit comments

Comments
 (0)