Hi,
In the output module there is a conditional and a raw usage of stdout.
try:
from ts2python.typeddict_shim import TypedDict, GenericTypedDict, NotRequired, Literal
# Overwrite typing.TypedDict for Runtime-Validation
except ImportError:
print("Module ts2python.typeddict_shim not found. Only coarse-grained "
"runtime type-validation of TypedDicts possible")
It is not a good practice of modules to write into stdout but use loggers or provide an API. A logger is not good in this early stage, so we left with an API or pre-setting.
As the warning is recoverable for a more primitive mode of operation which may be acceptable, please consider to have a conditional that is based on a variable that may be set before the import or some argument to the build to silent the warning.
Thanks,
Hi,
In the output module there is a conditional and a raw usage of stdout.
It is not a good practice of modules to write into stdout but use loggers or provide an API. A logger is not good in this early stage, so we left with an API or pre-setting.
As the warning is recoverable for a more primitive mode of operation which may be acceptable, please consider to have a conditional that is based on a variable that may be set before the import or some argument to the build to silent the warning.
Thanks,