Use "co_consts" in docstring detection.

Note: this is an upheaval because we need to pass "code" or at least
"code.co_consts" to the docstring detection routine
This commit is contained in:
rocky
2020-07-21 10:31:07 -04:00
parent f62512dd65
commit a215ee2f00
15 changed files with 75 additions and 42 deletions

View File

@@ -90,7 +90,7 @@ def customize_for_version3(self, version):
code_obj = node[1].attr
assert iscode(code_obj)
code = Code(code_obj, self.scanner, self.currentclass)
ast = self.build_ast(code._tokens, code._customize)
ast = self.build_ast(code._tokens, code._customize, code)
self.customize(code._customize)
# skip over: sstmt, stmt, return, ret_expr