You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Before I submit a PR, would the maintainer be open to allowing the following construct?
ttl=env.timedelta("TTL", default=600) # Currently worksttl=env.timedelta("TTL", default=timedelta(minutes=10)) # Raises `environs.EnvValidationError`
The concept could be extended to other types, too: i.e., when the default value is provided in the already casted/output type, then use it as-is.
I think it'd make the interface nicer because expressing durations (for instance) only in seconds is less declarative than using a natural timedelta construct (especially when dealing with more complex durations).
Thoughts?
The text was updated successfully, but these errors were encountered:
Before I submit a PR, would the maintainer be open to allowing the following construct?
The concept could be extended to other types, too: i.e., when the default value is provided in the already casted/output type, then use it as-is.
I think it'd make the interface nicer because expressing durations (for instance) only in seconds is less declarative than using a natural
timedelta
construct (especially when dealing with more complex durations).Thoughts?
The text was updated successfully, but these errors were encountered: