-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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 F821 regression for classes marked as runtime-required #10511
Conversation
d05ec97
to
d9ba729
Compare
|
code | total | + violation | - violation | + fix | - fix |
---|---|---|---|---|---|
FA100 | 80 | 80 | 0 | 0 | 0 |
SLF001 | 24 | 0 | 24 | 0 | 0 |
UP037 | 10 | 10 | 0 | 0 | 0 |
F821 | 7 | 7 | 0 | 0 | 0 |
Linter (preview)
ℹ️ ecosystem check detected linter changes. (+92 -28 violations, +0 -0 fixes in 6 projects; 37 projects unchanged)
apache/airflow (+1 -26 violations, +0 -0 fixes)
ruff check --no-cache --exit-zero --ignore RUF9 --output-format concise --preview --select ALL
- airflow/api_internal/endpoints/rpc_api_endpoint.py:58:9: SLF001 Private member accessed: `_add_to_db` - airflow/api_internal/endpoints/rpc_api_endpoint.py:59:9: SLF001 Private member accessed: `_fetch_from_db` - airflow/api_internal/endpoints/rpc_api_endpoint.py:60:9: SLF001 Private member accessed: `_kill` - airflow/api_internal/endpoints/rpc_api_endpoint.py:61:9: SLF001 Private member accessed: `_update_heartbeat` - airflow/api_internal/endpoints/rpc_api_endpoint.py:62:9: SLF001 Private member accessed: `_update_in_db` - airflow/api_internal/endpoints/rpc_api_endpoint.py:64:9: SLF001 Private member accessed: `_fetch_connection` ... 18 additional changes omitted for rule SLF001 + airflow/providers/amazon/aws/operators/appflow.py:486:13: UP037 [*] Remove quotes from type annotation - airflow/providers/google/cloud/hooks/gcs.py:859:49: PLC2701 Private name import `_blobs_page_start` from external module `google.cloud.storage.bucket` - airflow/providers/google/cloud/hooks/gcs.py:859:68: PLC2701 Private name import `_item_to_blob` from external module `google.cloud.storage.bucket` - tests/providers/amazon/aws/utils/test_utils.py:22:5: PLC2701 Private name import `_StringCompareEnum` from external module `airflow.providers.amazon.aws.utils` ... 17 additional changes omitted for project
bokeh/bokeh (+7 -0 violations, +0 -0 fixes)
ruff check --no-cache --exit-zero --ignore RUF9 --output-format concise --preview --select ALL
+ src/bokeh/colors/color.py:52:35: UP037 [*] Remove quotes from type annotation + src/bokeh/core/query.py:58:48: UP037 [*] Remove quotes from type annotation + src/bokeh/core/serialization.py:186:37: UP037 [*] Remove quotes from type annotation + src/bokeh/core/serialization.py:187:40: UP037 [*] Remove quotes from type annotation + src/bokeh/core/types.py:56:34: UP037 [*] Remove quotes from type annotation + tests/support/util/examples.py:60:41: UP037 [*] Remove quotes from type annotation + tests/support/util/examples.py:60:61: UP037 [*] Remove quotes from type annotation
freedomofpress/securedrop (+0 -1 violations, +0 -0 fixes)
ruff check --no-cache --exit-zero --ignore RUF9 --output-format concise --preview
- securedrop/secure_tempfile.py:3:22: PLC2701 Private name import `_TemporaryFileWrapper` from external module `tempfile`
ibis-project/ibis (+2 -0 violations, +0 -0 fixes)
ruff check --no-cache --exit-zero --ignore RUF9 --output-format concise --preview
+ ibis/common/typing.py:22:54: UP037 [*] Remove quotes from type annotation + ibis/common/typing.py:27:47: UP037 [*] Remove quotes from type annotation
python/mypy (+2 -0 violations, +0 -0 fixes)
ruff check --no-cache --exit-zero --ignore RUF9 --output-format concise --preview
+ mypy/build.py:121:31: F821 Undefined name `State` + mypy/subtypes.py:77:69: F821 Undefined name `SubtypeContext`
zulip/zulip (+80 -1 violations, +0 -0 fixes)
ruff check --no-cache --exit-zero --ignore RUF9 --output-format concise --preview --select ALL
+ analytics/lib/counts.py:376:32: FA100 Missing `from __future__ import annotations`, but uses `typing.Dict` + analytics/management/commands/populate_analytics_db.py:153:42: FA100 Missing `from __future__ import annotations`, but uses `typing.Union` + analytics/management/commands/populate_analytics_db.py:153:65: FA100 Missing `from __future__ import annotations`, but uses `typing.List` + analytics/views/stats.py:262:28: FA100 Missing `from __future__ import annotations`, but uses `typing.Union` + analytics/views/stats.py:263:9: FA100 Missing `from __future__ import annotations`, but uses `typing.Type` + analytics/views/stats.py:264:9: FA100 Missing `from __future__ import annotations`, but uses `typing.Type` + analytics/views/stats.py:265:9: FA100 Missing `from __future__ import annotations`, but uses `typing.Type` + analytics/views/stats.py:266:9: FA100 Missing `from __future__ import annotations`, but uses `typing.Type` + confirmation/models.py:65:41: FA100 Missing `from __future__ import annotations`, but uses `typing.Union` + zerver/actions/streams.py:702:19: FA100 Missing `from __future__ import annotations`, but uses `typing.Tuple` + zerver/actions/streams.py:702:25: FA100 Missing `from __future__ import annotations`, but uses `typing.List` + zerver/actions/streams.py:702:40: FA100 Missing `from __future__ import annotations`, but uses `typing.List` + zerver/actions/streams.py:889:29: FA100 Missing `from __future__ import annotations`, but uses `typing.Tuple` + zerver/actions/streams.py:890:10: FA100 Missing `from __future__ import annotations`, but uses `typing.Tuple` + zerver/actions/streams.py:890:39: FA100 Missing `from __future__ import annotations`, but uses `typing.List` + zerver/actions/streams.py:890:44: FA100 Missing `from __future__ import annotations`, but uses `typing.Tuple` + zerver/actions/streams.py:890:5: FA100 Missing `from __future__ import annotations`, but uses `typing.List` ... 64 additional changes omitted for rule FA100 - zerver/lib/queue.py:84:13: SLF001 Private member accessed: `_DEFAULT` ... 63 additional changes omitted for project
Changes by rule (5 rules affected)
code | total | + violation | - violation | + fix | - fix |
---|---|---|---|---|---|
FA100 | 80 | 80 | 0 | 0 | 0 |
SLF001 | 24 | 0 | 24 | 0 | 0 |
UP037 | 10 | 10 | 0 | 0 | 0 |
PLC2701 | 4 | 0 | 4 | 0 | 0 |
F821 | 2 | 2 | 0 | 0 | 0 |
I think this is not quite right but I haven't dug into why. It seems off to me that we have to set |
Yeah, the ecosystem results indicate that this definitely is not quite right just yet :/ |
Let's start with a revert and revisit the fix itself. |
Sure, I'll do a revert PR now 👍 |
#10513 to revert. |
I'm still looking at this locally, but closing the PR for now |
Fixes #10451. This is basically a revert of 704fefc, but includes a more principled fix for the issue that that PR was trying to fix (#10362)