-
-
Notifications
You must be signed in to change notification settings - Fork 374
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
Add "attr.validators.disabled" context manager #859
Conversation
My first idea was to name the function with out_validators():
... 🤪 |
8bf5cb8
to
561addd
Compare
561addd
to
d37469c
Compare
I think I like his |
It’s not more thread-(un)safe than the underlying function
I’d have no problem with that, but |
100% correct, it's just that a context manager looks like it might be so we should nail it home in the doc strings – ideally with a warning block.
It would. But OTOH I don't expect anyone to use |
It has been done. |
17fc66b
to
9ad4702
Compare
Is there anything left to be done? |
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.
- a bunch of suggestions
- we need types hints! :)
- also please typing_example.py
- add a news fragment please: https://github.com/python-attrs/attrs/blob/main/.github/CONTRIBUTING.rst#changelog
Done. Not sure, what kind of example you think of for the typing examples, though. |
"Just a few docs and typing changes. What could go wrong", he thought. Gonna fix it tomorrow. |
Just use the API and see if MyPy complains. :) |
2b7caed
to
bd1c5d8
Compare
Okay, fixed it. |
Signed-off-by: Hynek Schlawack <[email protected]>
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.
Thanks!
I've done some minor fixes myself. The gh cli is really neat.
Pull Request Check List
This is just a friendly reminder about the most common mistakes. Please make sure that you tick all boxes. But please read our contribution guide at least once, it will save you unnecessary review cycles!
If an item doesn't apply to your pull request, check it anyway to make it apparent that there's nothing left to do. If your pull request is a documentation fix or a trivial typo, feel free to delete the whole thing.
.pyi
).tests/typing_example.py
.docs/api.rst
by hand.@attr.s()
have to be added by hand too.versionadded
,versionchanged
, ordeprecated
directives. Find the appropriate next version in our__init__.py
file..rst
files is written using semantic newlines.changelog.d
.If you have any questions to any of the points above, just submit and ask! This checklist is here to help you, not to deter you from contributing!