Use repr on const field values
This commit is contained in:
parent
b14085019c
commit
c6dd2995f6
@ -88,7 +88,7 @@ def generate_python_code(typs: Typesdict) -> str:
|
||||
'',
|
||||
*[f' {fname}: {get_typehint(desc)}' for fname, desc in fields],
|
||||
*[
|
||||
f' {fname}: ClassVar[{get_typehint((1, ftype))}] = {fvalue}'
|
||||
f' {fname}: ClassVar[{get_typehint((1, ftype))}] = {fvalue!r}'
|
||||
for fname, ftype, fvalue in consts
|
||||
],
|
||||
f' __msgtype__: ClassVar[str] = {name!r}',
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user