Skip to content

Commit 4deb539

Browse files
committed
tools: modify the generate scripts to be fine without abstract info
1 parent 3dd0531 commit 4deb539

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-4
lines changed

Diff for: tools/generate_func.py

+6-2
Original file line numberDiff line numberDiff line change
@@ -213,8 +213,12 @@ def cleanup(name):
213213

214214
shortname = name[3:]
215215
names.append(shortname)
216-
func_info = abstract.Function(shortname).info
217-
defaults, documentation = abstract._get_defaults_and_docs(func_info)
216+
try:
217+
func_info = abstract.Function(shortname).info
218+
defaults, documentation = abstract._get_defaults_and_docs(func_info)
219+
except:
220+
print("cannot find defaults and docs for", shortname, file=sys.stderr)
221+
defaults, documentation = {}, ""
218222

219223
print('@wraparound(False) # turn off relative indexing from end of lists')
220224
print('@boundscheck(False) # turn off bounds-checking for entire function')

Diff for: tools/generate_stream.py

+6-2
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,12 @@ def cleanup(name):
8080

8181
shortname = name[3:]
8282
names.append(shortname)
83-
func_info = abstract.Function(shortname).info
84-
defaults, documentation = abstract._get_defaults_and_docs(func_info)
83+
try:
84+
func_info = abstract.Function(shortname).info
85+
defaults, documentation = abstract._get_defaults_and_docs(func_info)
86+
except:
87+
print("cannot find defaults and docs for", shortname, file=sys.stderr)
88+
defaults, documentation = {}, ""
8589

8690
print('@wraparound(False) # turn off relative indexing from end of lists')
8791
print('@boundscheck(False) # turn off bounds-checking for entire function')

0 commit comments

Comments
 (0)