Use latest grammar for parsing docstrings
This commit is contained in:
1 parent
da4e6f275e
commit
0d11a94dad
1 file changed
+1
-1
@@ -111,7 +111,7 @@ def _expand_typestr(type_str):
|
|||||||
yield type_str.split('of')[0]
|
yield type_str.split('of')[0]
|
||||||
# Check if type has is a set of valid literal values eg: {'C', 'F', 'A'}
|
# Check if type has is a set of valid literal values eg: {'C', 'F', 'A'}
|
||||||
elif type_str.startswith('{'):
|
elif type_str.startswith('{'):
|
||||||
node = parse(type_str, version='3.6').children[0]
|
node = parse(type_str, version='3.7').children[0]
|
||||||
if node.type == 'atom':
|
if node.type == 'atom':
|
||||||
for leaf in node.children[1].children:
|
for leaf in node.children[1].children:
|
||||||
if leaf.type == 'number':
|
if leaf.type == 'number':
|
||||||
|
|||||||
Reference in new issue
Block a user