-
Notifications
You must be signed in to change notification settings - Fork 20
Open
Description
Not super important, I just noticed when looking through the atdev log for testing NATA scripts there were a hundred lines of silent errors with the formatter. My understanding is that logging values should be fairly arbitrary in the data that is accepted, and I don't see the value in rounding logged things.
Maybe when we get onto 3.13 we can figure out how to use generics to make it clearer what values a check and all its methods expect.
def chk_log_value(test_val, description="", fmt=None) -> bool:
"""Log test_val"""
return _message_parse(
test_val=test_val,
target=_log_value,
description=description,
formatter=_format_testvalue,
fmt=fmt,
)
...
def _format_testvalue(chk: _CheckClass) -> str:
fmt = chk.fmt if chk.fmt is not None else ".3g" # Default
return f"{chk.status}: {chk.test_val:{fmt}} : {chk.description}"ValueError: Unknown format code 'g' for object of type 'str'
Metadata
Metadata
Assignees
Labels
No labels