Commit 4ed07470 authored by Bryton Lacquement's avatar Bryton Lacquement 🚪

util: also support classes when parsing a type

parent 053c0ef5
...@@ -6,9 +6,9 @@ from lib2to3.pygram import python_symbols as syms ...@@ -6,9 +6,9 @@ from lib2to3.pygram import python_symbols as syms
import re import re
type_match = re.compile(r"^<type '(.*)'>$").match type_match = re.compile(r"^<(type|class) '(.*)'>$").match
def parse_type(type_): def parse_type(type_):
return type_match(str(type_)).group(1) return type_match(str(type_)).group(2)
def data2types(data): def data2types(data):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment