Skip to content

Commit 538d301

Browse files
committed
address review: add fake signature for Struct
1 parent 76f8723 commit 538d301

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

Lib/test/test_inspect/test_inspect.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6295,8 +6295,7 @@ def test_stat_module_has_signatures(self):
62956295

62966296
def test_struct_module_has_signatures(self):
62976297
import struct
6298-
unsupported_signature = {'Struct'}
6299-
self._test_module_has_signatures(struct, unsupported_signature=unsupported_signature)
6298+
self._test_module_has_signatures(struct)
63006299

63016300
def test_string_module_has_signatures(self):
63026301
import string

Modules/_struct.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1825,6 +1825,7 @@ s_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
18251825
}
18261826

18271827
/*[clinic input]
1828+
@text_signature "(format)"
18281829
Struct.__init__
18291830
18301831
format: object = NULL
@@ -1837,7 +1838,7 @@ to the format string. See help(struct) for more on format strings.
18371838

18381839
static int
18391840
Struct___init___impl(PyStructObject *self, PyObject *format)
1840-
/*[clinic end generated code: output=b8e80862444e92d0 input=6275ff3f85752dd7]*/
1841+
/*[clinic end generated code: output=b8e80862444e92d0 input=dcf0b5a00eb0dbd9]*/
18411842
{
18421843
if (!format && !self->s_codes) {
18431844
PyErr_SetString(PyExc_TypeError,

Modules/clinic/_struct.c.h

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)