Hotfix typename escape
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
[project]
|
||||
name = "megasniff"
|
||||
version = "0.2.5"
|
||||
version = "0.2.5.post1"
|
||||
description = "Library for in-time codegened type validation"
|
||||
authors = [
|
||||
{ name = "nikto_b", email = "niktob560@yandex.ru" }
|
||||
|
||||
@@ -71,7 +71,8 @@ def typename(tp: type) -> str:
|
||||
ret = ''
|
||||
if get_origin(tp) is None and hasattr(tp, '__name__'):
|
||||
ret = tp.__name__
|
||||
ret = str(tp)
|
||||
else:
|
||||
ret = str(tp)
|
||||
ret = (ret
|
||||
.replace('.', '_')
|
||||
.replace('[', '_of_')
|
||||
|
||||
Reference in New Issue
Block a user