Skip to content

Commit eda93e1

Browse files
author
boris
committed
pass attribute to extra_info
not its name
1 parent b3b9196 commit eda93e1

File tree

1 file changed

+5
-9
lines changed

1 file changed

+5
-9
lines changed

extra_tests/not_impl_gen.py

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -95,15 +95,11 @@ def gen_methods():
9595
methods = {}
9696
for typ_code in objects + iters:
9797
typ = eval(typ_code)
98-
methods[typ.__name__] = (
99-
typ_code,
100-
extra_info(typ),
101-
[
102-
(attr, extra_info(attr))
103-
for attr in dir(typ)
104-
if attr_is_not_inherited(typ, attr)
105-
],
106-
)
98+
attrs = []
99+
for attr in dir(typ):
100+
if attr_is_not_inherited(typ, attr):
101+
attrs.append((attr, extra_info(getattr(typ, attr))))
102+
methods[typ.__name__] = (typ_code, extra_info(typ), attrs)
107103

108104
output = "expected_methods = {\n"
109105
for name, (typ_code, extra, attrs) in methods.items():

0 commit comments

Comments
 (0)