Hotfix typename escape

This commit is contained in:
2025-09-14 01:54:06 +03:00
parent 4b77eb4217
commit b724e3c5dd
2 changed files with 3 additions and 2 deletions

View File

@@ -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" }

View File

@@ -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_')