File tree Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change 11
11
import socket
12
12
import sys
13
13
import types
14
+ import typing
14
15
15
16
def eprint (* args , ** kwargs ):
16
17
print (* args , file = sys .stderr , ** kwargs )
@@ -29,6 +30,7 @@ def eprint(*args, **kwargs):
29
30
str : "str" ,
30
31
type (None ): "none" ,
31
32
type : "type" ,
33
+ typing .TypeAliasType : "type" ,
32
34
types .FunctionType : "function"
33
35
}
34
36
HEAP_TYPES = {
@@ -120,6 +122,8 @@ def format(self):
120
122
if search_result is not None :
121
123
type_name = f"<class '{ search_result .group (1 )} '>"
122
124
d ["value" ] = type_name
125
+ elif type (d ["value" ]) == typing .TypeAliasType :
126
+ d ["value" ] = "<TypeAlias>"
123
127
elif inspect .isfunction (d ["value" ]):
124
128
function_desc = str (d ["value" ])
125
129
search_result = function_str_regex .search (function_desc )
You can’t perform that action at this time.
0 commit comments