-
-
Notifications
You must be signed in to change notification settings - Fork 32.1k
Improve the documentation for ignore_warnings
#103109
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
Labels
Comments
erlend-aasland
pushed a commit
that referenced
this issue
Apr 2, 2023
Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
miss-islington
pushed a commit
to miss-islington/cpython
that referenced
this issue
Apr 2, 2023
…onGH-103110) (cherry picked from commit 32937d6) Co-authored-by: Charlie Zhao <zhaoyu_hit@qq.com> Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
This was referenced Apr 2, 2023
miss-islington
pushed a commit
to miss-islington/cpython
that referenced
this issue
Apr 2, 2023
…onGH-103110) (cherry picked from commit 32937d6) Co-authored-by: Charlie Zhao <zhaoyu_hit@qq.com> Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
Fixing the docstring and adding documentation seems enough for now. AFAIK, there is no need for adding a default value (consistency with |
miss-islington
added a commit
that referenced
this issue
Apr 2, 2023
miss-islington
added a commit
that referenced
this issue
Apr 2, 2023
gaogaotiantian
pushed a commit
to gaogaotiantian/cpython
that referenced
this issue
Apr 8, 2023
…on#103110) Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
warsaw
pushed a commit
to warsaw/cpython
that referenced
this issue
Apr 11, 2023
…on#103110) Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Documentation
Recently, I found that using
ignore_warnings(*, category)
, a simple decorator intest.support.warning_helper
, is sometimes a concise way to suppress warnings in test cases. For example:What I want to improve:
ignore_warnings
, it writesBut in fact this can become a more general warning suppression decorator, not just deprecation warnings, we can improve this comment.
ignore_warnings
.ignore_warnings(*, category=Warning)
, so that the behavior of this decorator is consistent withwarnings.simplefilter
.Linked PRs
ignore_warnings
#103110The text was updated successfully, but these errors were encountered: