-
-
Notifications
You must be signed in to change notification settings - Fork 3k
[pre-commit.ci] pre-commit autoupdate #13733
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
Changes from all commits
aaeb1ca
779cecd
5d1366a
b290db3
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| ignore = ["RUF059"] |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -9,9 +9,10 @@ | |
| from unittest import mock | ||
| import warnings | ||
|
|
||
| from py import error | ||
| from py.path import local | ||
|
|
||
| from py import error | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This doesn't seem right. Why does ruff want inverse sort inhere?
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No idea TBH 🤷♂️ I don't care too much as long as it is consistent in different machines/computers. |
||
|
|
||
| import pytest | ||
|
|
||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,9 +1,11 @@ | ||
| # mypy: allow-untyped-defs | ||
| from __future__ import annotations | ||
|
|
||
| from _pytest.fixtures import FixtureLookupError | ||
| import pytest | ||
|
|
||
|
|
||
| @pytest.fixture | ||
| def arg2(request): | ||
| pytest.raises(Exception, request.getfixturevalue, "arg1") | ||
| with pytest.raises(FixtureLookupError): | ||
| request.getfixturevalue("arg1") |
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.
Why not change the type in the method signature and rely on these to perform type narrowing?
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.
I tried to play with it but couldn't get it right TBH.
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.
the method is not supposed to accept these types, these error messages are explicitly for if a user is not using type checking and sending invalid types into the method.