-
-
Notifications
You must be signed in to change notification settings - Fork 288
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
Fix #1055 allow multiple validators with cast for the same field #1080
Conversation
✅ Deploy Preview for dynaconf ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #1080 +/- ##
=======================================
Coverage 98.75% 98.75%
=======================================
Files 23 23
Lines 2248 2249 +1
=======================================
+ Hits 2220 2221 +1
Misses 28 28 ☔ View full report in Codecov by Sentry. |
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.
Otherwise LGTM
```python from dynaconf import Dynaconf from dynaconf import Validator settings = Dynaconf(var="dynaconf") def a(v): print("called a, replace conf -> settings") return v.replace("conf", "settings") def b(v): print("called b, transform to upper DYNASETTINGS") return v.upper() validators = [ Validator("var", cast=a), Validator("var", cast=b), ] settings.validators.register(*validators) settings.validators.validate_all() assert settings.var == "DYNASETTINGS", settings.var ``` Fix #1055
Fix #1055