Fix post init hook not being called if validators are disabled (#129) #130
Conversation
Current coverage is 100% (diff: 100%)@@ master #130 diff @@
====================================
Files 8 8
Lines 505 504 -1
Methods 0 0
Messages 0 0
Branches 110 110
====================================
- Hits 505 504 -1
Misses 0 0
Partials 0 0
|
Well that sure is an oops! :) Could you add tests and a changelog entry please? |
Almost there, thank you! |
src/attr/_make.py
Outdated
a.name)) | ||
names_for_globals[val_name] = a.validator | ||
names_for_globals[attr_name] = a | ||
lines.append("if _config._run_validators:") |
hynek
Jan 6, 2017
Member
Please use the more explicit if _config._run_validators is True:
.
Please use the more explicit if _config._run_validators is True:
.
CHANGELOG.rst
Outdated
@@ -26,6 +26,8 @@ Changes: | |||
|
|||
- Raise ``FrozenInstanceError`` when trying to delete an attribute from a frozen class. | |||
`#118 <https://github.com/hynek/attrs/pull/118>`_ | |||
- Fix __attrs_post_init__ not being run when the validation is disabled. |
hynek
Jan 6, 2017
Member
Please put __attrs_post_init__
in double backticks to make it code (like FrozenInstanceError above).
Please put __attrs_post_init__
in double backticks to make it code (like FrozenInstanceError above).
Thanks! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
No description provided.