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