-
Notifications
You must be signed in to change notification settings - Fork 8
[core] Add support for comma format #54
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: nhairs-log-record
Are you sure you want to change the base?
Conversation
if self._fmt is None: | ||
# TODO: does it matter that we do this before checking if the style is valid? | ||
# (we already (mostly) check for valid style names in __init__ | ||
return [] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does it matter that we do this before checking if the style is valid?
We already (mostly) check for valid style names in __init__
if isinstance(self._style, str) and self._style == ",": | ||
# TODO: should we check that there are no empty fields? | ||
# If yes we should do this in __init__ where we validate other styles? | ||
# Do we drop empty fields? | ||
# etc | ||
return [field.strip() for field in self._fmt.split(",") if field.strip()] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we check that there are no empty fields?
If yes we should do this in __init__
where we validate other styles?
Is it okay that we drop empty fields?
etc
@@ -285,10 +303,7 @@ def parse(self) -> List[str]: | |||
else: | |||
raise ValueError(f"Style {self._style!r} is not supported") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This needs updating. Probably need to find a different representation since $,%,{,,
isn't exactly intuitive...
Fixes #15
Test Plan
To Do
TODO
comments.