Skip to content
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

Warn instead of error when removed rules are used in ignore #14435

Merged
merged 2 commits into from
Nov 19, 2024

Conversation

MichaReiser
Copy link
Member

@MichaReiser MichaReiser commented Nov 18, 2024

Summary

Emit a warning when users ignores a removed rule using ignore or extend-ignore instead of erroring.

The main reason for removing rules are:

  • They overlap with another rule
  • They have some problematic behavior

It's common for users to explicitly ignore those rules, possibly in shared configurations used across multiple ruff versions.
That makes it difficult to use the same configuration with multiple ruff versions.

Another motivation is that removed rules result in failed ecosystem checks, which causes us to get a very low signal until the upstream projects update their settings.

This PR re-adds UP027 as a removed rule. This also has the advantage that it remains listed on our documentation and reduces the risk that we accidentally re-implement the rule or re-use the rule code.

Closes #13505

We should rebase #14384, #14385, and #14428 and mark those rules as removed instead of removing the codes entirely

Test Plan

Added tests. I manually ran ruff check . --ignore UP027 and ruff check . --extend-ignore UP027 to verify the behavior

@MichaReiser MichaReiser requested a review from zanieb November 18, 2024 15:28
@MichaReiser MichaReiser added the configuration Related to settings and configuration label Nov 18, 2024
@MichaReiser MichaReiser added this to the v0.8 milestone Nov 18, 2024
@MichaReiser MichaReiser force-pushed the micha/warn-about-ignored-removed-rules branch 2 times, most recently from bc6d258 to 2a831b9 Compare November 18, 2024 15:39
Copy link
Contributor

github-actions bot commented Nov 18, 2024

ruff-ecosystem results

Linter (stable)

ℹ️ ecosystem check detected linter changes. (+746 -702 violations, +0 -0 fixes in 8 projects; 1 project error; 45 projects unchanged)

apache/airflow (+115 -111 violations, +0 -0 fixes)

ruff check --no-cache --exit-zero --ignore RUF9 --output-format concise --no-preview --select ALL

+ airflow/__main__.py:25:22: TC003 Move standard library import `argparse.Namespace` into a type-checking block
- airflow/__main__.py:25:22: TCH003 Move standard library import `argparse.Namespace` into a type-checking block
+ airflow/api_connexion/schemas/asset_schema.py:19:22: TC003 Move standard library import `datetime.datetime` into a type-checking block
- airflow/api_connexion/schemas/asset_schema.py:19:22: TCH003 Move standard library import `datetime.datetime` into a type-checking block
+ airflow/api_fastapi/common/parameters.py:21:22: TC003 Move standard library import `datetime.datetime` into a type-checking block
- airflow/api_fastapi/common/parameters.py:21:22: TCH003 Move standard library import `datetime.datetime` into a type-checking block
+ airflow/api_fastapi/common/router.py:20:18: TC003 Move standard library import `enum.Enum` into a type-checking block
- airflow/api_fastapi/common/router.py:20:18: TCH003 Move standard library import `enum.Enum` into a type-checking block
+ airflow/api_fastapi/common/types.py:19:22: TC003 Move standard library import `datetime.timedelta` into a type-checking block
- airflow/api_fastapi/common/types.py:19:22: TCH003 Move standard library import `datetime.timedelta` into a type-checking block
... 216 additional changes omitted for project

apache/superset (+321 -321 violations, +0 -0 fixes)

ruff check --no-cache --exit-zero --ignore RUF9 --output-format concise --no-preview --select ALL

+ superset/advanced_data_type/api.py:28:47: TC001 Move application import `superset.advanced_data_type.types.AdvancedDataTypeResponse` into a type-checking block
- superset/advanced_data_type/api.py:28:47: TCH001 Move application import `superset.advanced_data_type.types.AdvancedDataTypeResponse` into a type-checking block
+ superset/async_events/async_query_manager.py:26:41: TC002 Move third-party import `flask_caching.backends.base.BaseCache` into a type-checking block
- superset/async_events/async_query_manager.py:26:41: TCH002 Move third-party import `flask_caching.backends.base.BaseCache` into a type-checking block
+ superset/charts/data/api.py:43:45: TC001 Move application import `superset.connectors.sqla.models.BaseDatasource` into a type-checking block
- superset/charts/data/api.py:43:45: TCH001 Move application import `superset.connectors.sqla.models.BaseDatasource` into a type-checking block
+ superset/charts/data/api.py:47:37: TC001 Move application import `superset.models.sql_lab.Query` into a type-checking block
- superset/charts/data/api.py:47:37: TCH001 Move application import `superset.models.sql_lab.Query` into a type-checking block
+ superset/cli/test_db.py:45:43: TC001 Move application import `superset.db_engine_specs.base.BaseEngineSpec` into a type-checking block
- superset/cli/test_db.py:45:43: TCH001 Move application import `superset.db_engine_specs.base.BaseEngineSpec` into a type-checking block
+ superset/commands/annotation_layer/annotation/create.py:18:22: TC003 Move standard library import `datetime.datetime` into a type-checking block
- superset/commands/annotation_layer/annotation/create.py:18:22: TCH003 Move standard library import `datetime.datetime` into a type-checking block
+ superset/commands/annotation_layer/annotation/create.py:23:25: TC002 Move third-party import `marshmallow.ValidationError` into a type-checking block
- superset/commands/annotation_layer/annotation/create.py:23:25: TCH002 Move third-party import `marshmallow.ValidationError` into a type-checking block
+ superset/commands/annotation_layer/annotation/delete.py:27:41: TC001 Move application import `superset.models.annotations.Annotation` into a type-checking block
- superset/commands/annotation_layer/annotation/delete.py:27:41: TCH001 Move application import `superset.models.annotations.Annotation` into a type-checking block
+ superset/commands/annotation_layer/annotation/update.py:18:22: TC003 Move standard library import `datetime.datetime` into a type-checking block
- superset/commands/annotation_layer/annotation/update.py:18:22: TCH003 Move standard library import `datetime.datetime` into a type-checking block
+ superset/commands/annotation_layer/annotation/update.py:23:25: TC002 Move third-party import `marshmallow.ValidationError` into a type-checking block
- superset/commands/annotation_layer/annotation/update.py:23:25: TCH002 Move third-party import `marshmallow.ValidationError` into a type-checking block
+ superset/commands/annotation_layer/annotation/update.py:35:41: TC001 Move application import `superset.models.annotations.Annotation` into a type-checking block
... 137 additional changes omitted for rule TC001
- superset/commands/annotation_layer/annotation/update.py:35:41: TCH001 Move application import `superset.models.annotations.Annotation` into a type-checking block
... 137 additional changes omitted for rule TCH001
... 620 additional changes omitted for project

bokeh/bokeh (+232 -232 violations, +0 -0 fixes)

ruff check --no-cache --exit-zero --ignore RUF9 --output-format concise --no-preview --select ALL

+ release/build.py:18:21: TC001 Move application import `.config.Config` into a type-checking block
- release/build.py:18:21: TCH001 Move application import `.config.Config` into a type-checking block
+ release/build.py:19:21: TC001 Move application import `.system.System` into a type-checking block
- release/build.py:19:21: TCH001 Move application import `.system.System` into a type-checking block
+ release/checks.py:19:21: TC001 Move application import `.config.Config` into a type-checking block
- release/checks.py:19:21: TCH001 Move application import `.config.Config` into a type-checking block
+ release/checks.py:20:23: TC001 Move application import `.pipeline.StepType` into a type-checking block
- release/checks.py:20:23: TCH001 Move application import `.pipeline.StepType` into a type-checking block
+ release/checks.py:21:21: TC001 Move application import `.system.System` into a type-checking block
- release/checks.py:21:21: TCH001 Move application import `.system.System` into a type-checking block
+ release/credentials.py:24:21: TC001 Move application import `.config.Config` into a type-checking block
... 189 additional changes omitted for rule TC001
- release/credentials.py:24:21: TCH001 Move application import `.config.Config` into a type-checking block
... 189 additional changes omitted for rule TCH001
+ src/bokeh/application/handlers/code.py:41:19: TC003 Move standard library import `types.ModuleType` into a type-checking block
- src/bokeh/application/handlers/code.py:41:19: TCH003 Move standard library import `types.ModuleType` into a type-checking block
+ src/bokeh/application/handlers/directory.py:58:19: TC003 Move standard library import `types.ModuleType` into a type-checking block
- src/bokeh/application/handlers/directory.py:58:19: TCH003 Move standard library import `types.ModuleType` into a type-checking block
... 448 additional changes omitted for project

ibis-project/ibis (+42 -0 violations, +0 -0 fixes)

+ ibis/backends/oracle/tests/test_client.py:3:36: RUF101 [*] `TCH003` is a redirect to `TC003`
+ ibis/backends/polars/rewrites.py:10:50: RUF101 [*] `TCH001` is a redirect to `TC001`
+ ibis/backends/sql/rewrites.py:17:57: RUF101 [*] `TCH001` is a redirect to `TC001`
+ ibis/backends/sql/rewrites.py:21:50: RUF101 [*] `TCH001` is a redirect to `TC001`
+ ibis/common/grounds.py:29:57: RUF101 [*] `TCH001` is a redirect to `TC001`
+ ibis/common/selectors.py:8:50: RUF101 [*] `TCH001` is a redirect to `TC001`
+ ibis/config.py:3:47: RUF101 [*] `TCH003` is a redirect to `TC003`
+ ibis/expr/builders.py:16:53: RUF101 [*] `TCH001` is a redirect to `TC001`
+ ibis/expr/builders.py:17:50: RUF101 [*] `TCH001` is a redirect to `TC001`
+ ibis/expr/datatypes/tests/test_core.py:3:26: RUF101 [*] `TCH003` is a redirect to `TC003`
... 32 additional changes omitted for project

latchbio/latch (+6 -6 violations, +0 -0 fixes)

+ src/latch/ldata/_transfer/upload.py:10:38: TC003 Move standard library import `multiprocessing.managers.DictProxy` into a type-checking block
- src/latch/ldata/_transfer/upload.py:10:38: TCH003 Move standard library import `multiprocessing.managers.DictProxy` into a type-checking block
+ src/latch/ldata/_transfer/upload.py:10:49: TC003 Move standard library import `multiprocessing.managers.ListProxy` into a type-checking block
- src/latch/ldata/_transfer/upload.py:10:49: TCH003 Move standard library import `multiprocessing.managers.ListProxy` into a type-checking block
+ src/latch/ldata/_transfer/upload.py:12:19: TC003 Move standard library import `queue.Queue` into a type-checking block
- src/latch/ldata/_transfer/upload.py:12:19: TCH003 Move standard library import `queue.Queue` into a type-checking block
+ src/latch/registry/record.py:18:49: TC001 Move application import `latch.registry.upstream_types.types.DBType` into a type-checking block
- src/latch/registry/record.py:18:49: TCH001 Move application import `latch.registry.upstream_types.types.DBType` into a type-checking block
+ src/latch_cli/services/register/utils.py:5:8: TC003 Move standard library import `io` into a type-checking block
- src/latch_cli/services/register/utils.py:5:8: TCH003 Move standard library import `io` into a type-checking block
... 2 additional changes omitted for project

pandas-dev/pandas (+0 -1 violations, +0 -0 fixes)

- pandas/core/dtypes/dtypes.py:76:23: TCH004 Move import `pyarrow` out of type-checking block. Import is used for more than type hinting.

zulip/zulip (+30 -30 violations, +0 -0 fixes)

ruff check --no-cache --exit-zero --ignore RUF9 --output-format concise --no-preview --select ALL

+ confirmation/models.py:36:9: TC001 Move application import `zilencer.models.PreregistrationRemoteRealmBillingUser` into a type-checking block
- confirmation/models.py:36:9: TCH001 Move application import `zilencer.models.PreregistrationRemoteRealmBillingUser` into a type-checking block
+ confirmation/models.py:37:9: TC001 Move application import `zilencer.models.PreregistrationRemoteServerBillingUser` into a type-checking block
- confirmation/models.py:37:9: TCH001 Move application import `zilencer.models.PreregistrationRemoteServerBillingUser` into a type-checking block
+ zerver/actions/message_edit.py:68:30: TC001 Move application import `zerver.lib.types.EditHistoryEvent` into a type-checking block
- zerver/actions/message_edit.py:68:30: TCH001 Move application import `zerver.lib.types.EditHistoryEvent` into a type-checking block
+ zerver/lib/bot_lib.py:3:29: TC003 Move standard library import `collections.abc.Callable` into a type-checking block
- zerver/lib/bot_lib.py:3:29: TCH003 Move standard library import `collections.abc.Callable` into a type-checking block
+ zerver/lib/logging_util.py:13:25: TC002 Move third-party import `django.http.HttpRequest` into a type-checking block
- zerver/lib/logging_util.py:13:25: TCH002 Move third-party import `django.http.HttpRequest` into a type-checking block
... 50 additional changes omitted for project

... Truncated remaining completed project reports due to GitHub comment length restrictions

pypa/setuptools (error)

ruff failed
  Cause: Failed to parse /home/runner/work/ruff/ruff/checkouts/pypa:setuptools/ruff.toml
  Cause: TOML parse error at line 8, column 1
  |
8 | [lint]
  | ^^^^^^
Unknown rule selector: `UP027`

Changes by rule (11 rules affected)

code total + violation - violation + fix - fix
TC001 352 352 0 0 0
TCH001 352 0 352 0 0
TC003 198 198 0 0 0
TCH003 198 0 198 0 0
TC002 147 147 0 0 0
TCH002 147 0 147 0 0
RUF101 46 46 0 0 0
D212 2 1 1 0 0
TC005 2 2 0 0 0
TCH005 2 0 2 0 0
TCH004 2 0 2 0 0

Linter (preview)

ℹ️ ecosystem check detected linter changes. (+9089 -9065 violations, +0 -66 fixes in 11 projects; 1 project error; 42 projects unchanged)

apache/airflow (+6295 -6294 violations, +0 -58 fixes)

ruff check --no-cache --exit-zero --ignore RUF9 --output-format concise --preview --select ALL

+ airflow/__main__.py:25:22: TC003 Move standard library import `argparse.Namespace` into a type-checking block
- airflow/__main__.py:25:22: TCH003 Move standard library import `argparse.Namespace` into a type-checking block
- airflow/api/__init__.py:32:5: DOC201 `return` is not documented in docstring
- airflow/api/__init__.py:32:5: DOC501 Raised exception `AirflowException` missing from docstring
+ airflow/api/__init__.py:43:15: DOC501 Raised exception `AirflowException` missing from docstring
+ airflow/api/__init__.py:44:5: DOC201 `return` is not documented in docstring
- airflow/api/auth/backend/deny_all.py:38:5: DOC201 `return` is not documented in docstring
+ airflow/api/auth/backend/deny_all.py:44:5: DOC201 `return` is not documented in docstring
- airflow/api/client/__init__.py:27:5: DOC201 `return` is not documented in docstring
+ airflow/api/client/__init__.py:38:5: DOC201 `return` is not documented in docstring
... 9025 additional changes omitted for rule DOC201
- airflow/api/common/delete_dag.py:43:5: DOC501 Raised exception `AirflowException` missing from docstring
- airflow/api/common/delete_dag.py:43:5: DOC501 Raised exception `DagNotFound` missing from docstring
+ airflow/api/common/delete_dag.py:61:15: DOC501 Raised exception `AirflowException` missing from docstring
+ airflow/api/common/delete_dag.py:64:15: DOC501 Raised exception `DagNotFound` missing from docstring
... 2953 additional changes omitted for rule DOC501
- airflow/api/common/mark_tasks.py:186:5: DOC402 `yield` is not documented in docstring
+ airflow/api/common/mark_tasks.py:190:13: DOC402 `yield` is not documented in docstring
+ airflow/api_connexion/schemas/asset_schema.py:19:22: TC003 Move standard library import `datetime.datetime` into a type-checking block
- airflow/api_connexion/schemas/asset_schema.py:19:22: TCH003 Move standard library import `datetime.datetime` into a type-checking block
- airflow/api_fastapi/common/db/common.py:33:5: DOC402 `yield` is not documented in docstring
+ airflow/api_fastapi/common/db/common.py:47:9: DOC402 `yield` is not documented in docstring
+ airflow/api_fastapi/common/parameters.py:21:22: TC003 Move standard library import `datetime.datetime` into a type-checking block
- airflow/api_fastapi/common/parameters.py:21:22: TCH003 Move standard library import `datetime.datetime` into a type-checking block
+ airflow/api_fastapi/common/router.py:20:18: TC003 Move standard library import `enum.Enum` into a type-checking block
- airflow/api_fastapi/common/router.py:20:18: TCH003 Move standard library import `enum.Enum` into a type-checking block
+ airflow/api_fastapi/common/types.py:19:22: TC003 Move standard library import `datetime.timedelta` into a type-checking block
- airflow/api_fastapi/common/types.py:19:22: TCH003 Move standard library import `datetime.timedelta` into a type-checking block
+ airflow/api_fastapi/core_api/datamodels/assets.py:20:22: TC003 Move standard library import `datetime.datetime` into a type-checking block
... 105 additional changes omitted for rule TC003
- airflow/api_fastapi/core_api/datamodels/assets.py:20:22: TCH003 Move standard library import `datetime.datetime` into a type-checking block
... 105 additional changes omitted for rule TCH003
+ airflow/assets/__init__.py:128:8: PLR1714 Consider merging multiple comparisons: `value in ("self", "context")`. Use a `set` if the elements are hashable.
- airflow/assets/__init__.py:128:8: PLR1714 Consider merging multiple comparisons: `value in {"self", "context"}`.
- airflow/assets/__init__.py:238:9: DOC402 `yield` is not documented in docstring
+ airflow/assets/__init__.py:243:9: DOC402 `yield` is not documented in docstring
... 329 additional changes omitted for rule DOC402
+ airflow/decorators/__init__.pyi:117:25: PYI041 Use `float` instead of `int | float`
- airflow/decorators/__init__.pyi:117:25: PYI041 [*] Use `float` instead of `int | float`
... 12613 additional changes omitted for project

apache/superset (+1491 -1493 violations, +0 -8 fixes)

ruff check --no-cache --exit-zero --ignore RUF9 --output-format concise --preview --select ALL

+ RELEASING/changelog.py:104:9: DOC201 `return` is not documented in docstring
- RELEASING/changelog.py:107:9: DOC201 `return` is not documented in docstring
+ RELEASING/changelog.py:113:13: DOC201 `return` is not documented in docstring
- RELEASING/changelog.py:52:9: DOC201 `return` is not documented in docstring
+ RELEASING/changelog.py:54:13: DOC201 `return` is not documented in docstring
- RELEASING/changelog.py:87:9: DOC201 `return` is not documented in docstring
... 1824 additional changes omitted for rule DOC201
- scripts/benchmark_migration.py:43:5: DOC501 Raised exception `Exception` missing from docstring
+ scripts/benchmark_migration.py:51:11: DOC501 Raised exception `Exception` missing from docstring
- scripts/cancel_github_workflows.py:162:5: DOC501 Raised exception `ClickException` missing from docstring
+ scripts/cancel_github_workflows.py:164:15: DOC501 Raised exception `ClickException` missing from docstring
... 2982 additional changes omitted for project

aws/aws-sam-cli (+1 -1 violations, +0 -0 fixes)

ruff check --no-cache --exit-zero --ignore RUF9 --output-format concise --preview

+ tests/integration/publish/publish_app_integ_base.py:60:16: PLR1714 Consider merging multiple comparisons: `f.suffix in (".yaml", ".json")`. Use a `set` if the elements are hashable.
- tests/integration/publish/publish_app_integ_base.py:60:16: PLR1714 Consider merging multiple comparisons: `f.suffix in {".yaml", ".json"}`.

bokeh/bokeh (+639 -638 violations, +0 -0 fixes)

ruff check --no-cache --exit-zero --ignore RUF9 --output-format concise --preview --select ALL

+ examples/advanced/extensions/parallel_plot/parallel_plot.py:107:5: DOC201 `return` is not documented in docstring
- examples/advanced/extensions/parallel_plot/parallel_plot.py:15:5: DOC201 `return` is not documented in docstring
- examples/basic/data/server_sent_events_source.py:53:9: DOC402 `yield` is not documented in docstring
+ examples/basic/data/server_sent_events_source.py:60:13: DOC402 `yield` is not documented in docstring
- examples/interaction/js_callbacks/js_on_event.py:16:5: DOC201 `return` is not documented in docstring
+ examples/interaction/js_callbacks/js_on_event.py:21:5: DOC201 `return` is not documented in docstring
+ examples/models/daylight.py:83:12: DTZ901 Use of `datetime.datetime.min` without timezone information
- examples/models/gauges.py:33:5: DOC201 `return` is not documented in docstring
+ examples/models/gauges.py:34:5: DOC201 `return` is not documented in docstring
... 395 additional changes omitted for rule DOC201
+ release/build.py:18:21: TC001 Move application import `.config.Config` into a type-checking block
... 1267 additional changes omitted for project

ibis-project/ibis (+42 -0 violations, +0 -0 fixes)

ruff check --no-cache --exit-zero --ignore RUF9 --output-format concise --preview

+ ibis/backends/oracle/tests/test_client.py:3:36: RUF101 [*] `TCH003` is a redirect to `TC003`
+ ibis/backends/polars/rewrites.py:10:50: RUF101 [*] `TCH001` is a redirect to `TC001`
+ ibis/backends/sql/rewrites.py:17:57: RUF101 [*] `TCH001` is a redirect to `TC001`
+ ibis/backends/sql/rewrites.py:21:50: RUF101 [*] `TCH001` is a redirect to `TC001`
+ ibis/common/grounds.py:29:57: RUF101 [*] `TCH001` is a redirect to `TC001`
+ ibis/common/selectors.py:8:50: RUF101 [*] `TCH001` is a redirect to `TC001`
+ ibis/config.py:3:47: RUF101 [*] `TCH003` is a redirect to `TC003`
+ ibis/expr/builders.py:16:53: RUF101 [*] `TCH001` is a redirect to `TC001`
+ ibis/expr/builders.py:17:50: RUF101 [*] `TCH001` is a redirect to `TC001`
+ ibis/expr/datatypes/tests/test_core.py:3:26: RUF101 [*] `TCH003` is a redirect to `TC003`
... 32 additional changes omitted for project

latchbio/latch (+8 -9 violations, +0 -0 fixes)

ruff check --no-cache --exit-zero --ignore RUF9 --output-format concise --preview

+ src/latch/ldata/_transfer/upload.py:10:38: TC003 Move standard library import `multiprocessing.managers.DictProxy` into a type-checking block
- src/latch/ldata/_transfer/upload.py:10:38: TCH003 Move standard library import `multiprocessing.managers.DictProxy` into a type-checking block
+ src/latch/ldata/_transfer/upload.py:10:49: TC003 Move standard library import `multiprocessing.managers.ListProxy` into a type-checking block
- src/latch/ldata/_transfer/upload.py:10:49: TCH003 Move standard library import `multiprocessing.managers.ListProxy` into a type-checking block
+ src/latch/ldata/_transfer/upload.py:12:19: TC003 Move standard library import `queue.Queue` into a type-checking block
- src/latch/ldata/_transfer/upload.py:12:19: TCH003 Move standard library import `queue.Queue` into a type-checking block
+ src/latch/registry/record.py:18:49: TC001 Move application import `latch.registry.upstream_types.types.DBType` into a type-checking block
- src/latch/registry/record.py:18:49: TCH001 Move application import `latch.registry.upstream_types.types.DBType` into a type-checking block
- src/latch/types/metadata.py:500:45: PYI061 `Literal[None, ...]` can be replaced with `Literal[...] | None`
+ src/latch_cli/services/register/utils.py:5:8: TC003 Move standard library import `io` into a type-checking block
... 7 additional changes omitted for project

pandas-dev/pandas (+0 -5 violations, +0 -0 fixes)

ruff check --no-cache --exit-zero --ignore RUF9 --output-format concise --preview

- pandas/core/dtypes/dtypes.py:76:23: TCH004 Move import `pyarrow` out of type-checking block. Import is used for more than type hinting.
- pandas/core/groupby/groupby.py:4069:39: PYI061 `Literal[None, ...]` can be replaced with `Literal[...] | None`
- pandas/core/groupby/indexing.py:299:39: PYI061 `Literal[None, ...]` can be replaced with `Literal[...] | None`
- pandas/io/html.py:1027:28: PYI061 `Literal[None, ...]` can be replaced with `Literal[...] | None`
- pandas/io/html.py:223:32: PYI061 `Literal[None, ...]` can be replaced with `Literal[...] | None`

... Truncated remaining completed project reports due to GitHub comment length restrictions

pypa/setuptools (error)

ruff check --no-cache --exit-zero --ignore RUF9 --output-format concise --preview

ruff failed
  Cause: Failed to parse /home/runner/work/ruff/ruff/checkouts/pypa:setuptools/ruff.toml
  Cause: TOML parse error at line 8, column 1
  |
8 | [lint]
  | ^^^^^^
Unknown rule selector: `UP027`

Changes by rule (22 rules affected)

code total + violation - violation + fix - fix
DOC201 12121 6060 6061 0 0
DOC501 3928 1964 1964 0 0
DOC402 408 204 204 0 0
TC001 352 352 0 0 0
TCH001 352 0 352 0 0
TC003 198 198 0 0 0
TCH003 198 0 198 0 0
DOC202 158 79 79 0 0
TC002 147 147 0 0 0
TCH002 147 0 147 0 0
PYI041 68 2 0 0 66
PLR1714 62 31 31 0 0
RUF101 46 46 0 0 0
PYI061 14 0 14 0 0
RUF038 7 0 7 0 0
DOC502 4 2 2 0 0
TC005 2 2 0 0 0
DOC403 2 1 1 0 0
TCH005 2 0 2 0 0
TCH004 2 0 2 0 0
DTZ901 1 1 0 0 0
RUF100 1 0 1 0 0

@MichaReiser
Copy link
Member Author

MichaReiser commented Nov 18, 2024

I suspect that the setuptools check is still failing because it fails for the ruff-0.8 branch

I have to look into what's up with pandas. I somehow suspect that it's panicking... but that's unrelated to this branch

Copy link
Collaborator

@dylwil3 dylwil3 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems like a good idea to me!

crates/ruff_workspace/src/configuration.rs Outdated Show resolved Hide resolved
Copy link
Member

@AlexWaygood AlexWaygood left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is great, thank you!

@MichaReiser
Copy link
Member Author

Okay, I don't know what's up with panda.... It passes just fine locally

@AlexWaygood
Copy link
Member

Okay, I don't know what's up with panda.... It passes just fine locally

That's been happening on all PRs recently, I think... I also don't know the reason...

@MichaReiser MichaReiser force-pushed the micha/warn-about-ignored-removed-rules branch 2 times, most recently from ee94e12 to 7015a3f Compare November 18, 2024 17:50
@MichaReiser
Copy link
Member Author

Uh, the diff for pandas is:

              "diff": [
                    "- All checks passed!"
                ],

@MichaReiser MichaReiser force-pushed the micha/warn-about-ignored-removed-rules branch from 7015a3f to 25a2336 Compare November 18, 2024 17:57
@Avasam
Copy link

Avasam commented Nov 18, 2024

Just for consideration and because I'd like to at least have an official decision on this if not supported:

What about rules that don't exists yet?

Let's say Ruff adds RUF0XX in 8.1. But I don't want that rule to be enabled. So I ignore RUF0XX. But now my shared config is no longer valid for Ruff 0.8

Btw I'm not requesting this be supported here (I appreciate this improvement as-is!). Just at least considered eventually.

@AlexWaygood
Copy link
Member

@Avasam let's merge this as-is (since, among other things, it unblocks the ruff 0.8 release) and consider that separately for the future

@dylwil3
Copy link
Collaborator

dylwil3 commented Nov 18, 2024

@Avasam if you'd like to open an issue for this that'd be helpful so the idea doesn't get lost 🙂

@Avasam
Copy link

Avasam commented Nov 18, 2024

@Avasam if you'd like to open an issue for this that'd be helpful so the idea doesn't get lost 🙂

That was part of the original issue, but I'll open a separate one as follow-up ! #14443

@MichaReiser
Copy link
Member Author

Oh I missed that part. We can keep the existing issue open.

@MichaReiser MichaReiser merged commit 10c6a2a into ruff-0.8 Nov 19, 2024
20 checks passed
@MichaReiser MichaReiser deleted the micha/warn-about-ignored-removed-rules branch November 19, 2024 07:36
@MichaReiser MichaReiser mentioned this pull request Nov 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
configuration Related to settings and configuration
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants