Skip to content
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

curate format-dates : --expected-date-formats defaults cannot be overridden #1707

Open
victorlin opened this issue Jan 7, 2025 · 2 comments
Labels
bug Something isn't working

Comments

@victorlin
Copy link
Member

victorlin commented Jan 7, 2025

continuing a side discussion from #1654

Problem

--expected-date-formats was originally written without defaults (empty list). Defaults were added in adf1e78, however due to use of action='extend', they cannot be overridden.

Possible solutions

  1. Change behavior so that --expected-date-formats overrides the defaults by using action=ExtendOverwriteDefault. This is likely to break lots of existing usage.
  2. Continue letting --expected-date-formats append to the defaults (i.e. builtins) and add another way to say you don't want the defaults (e.g. --no-builtin-date-formats flag or --override-expected-date-formats=FMT … option with args or something along those lines).
@victorlin
Copy link
Member Author

In in #1709 (comment), @joverlee521 clarified that the defaults were added after adf1e78, so I've reworded the issue description. Directly relevant discussion is also happening in that thread.

@victorlin
Copy link
Member Author

#1709 addresses the first part of option 2:

2. Continue letting --expected-date-formats append to the defaults (i.e. builtins) …

As for the second part,

… and add another way to say you don't want the defaults (e.g. --no-builtin-date-formats flag or --override-expected-date-formats=FMT … option with args or something along those lines).

my vote is for --no-builtin-date-formats since I think having both --expected-date-formats=FMT … and --override-expected-date-formats=FMT … is slightly more confusing and requires more implementation logic.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant