Skip to content

Conversation

nhairs
Copy link
Owner

@nhairs nhairs commented May 26, 2025

Fixes #15

Test Plan

  • Unit tests

To Do

Comment on lines +280 to +283
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 []
Copy link
Owner Author

@nhairs nhairs May 26, 2025

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__

Comment on lines +285 to +290
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()]
Copy link
Owner Author

@nhairs nhairs May 26, 2025

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")
Copy link
Owner Author

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...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant