Ignore unused arguments on stub functions#12966
Merged
charliermarsh merged 1 commit intomainfrom Aug 18, 2024
Merged
Conversation
f75e1ec to
ce7df06
Compare
CodSpeed Performance ReportMerging #12966 will degrade performances by 5.17%Comparing Summary
Benchmarks breakdown
|
Contributor
|
| code | total | + violation | - violation | + fix | - fix |
|---|---|---|---|---|---|
| ARG001 | 289 | 0 | 289 | 0 | 0 |
| RUF100 | 2 | 2 | 0 | 0 | 0 |
Linter (preview)
ℹ️ ecosystem check detected linter changes. (+2 -289 violations, +0 -0 fixes in 6 projects; 48 projects unchanged)
apache/airflow (+0 -177 violations, +0 -0 fixes)
ruff check --no-cache --exit-zero --ignore RUF9 --output-format concise --preview --select ALL
- airflow/listeners/spec/dagrun.py:31:24: ARG001 Unused function argument: `dag_run` - airflow/listeners/spec/dagrun.py:31:41: ARG001 Unused function argument: `msg` - airflow/listeners/spec/dagrun.py:36:24: ARG001 Unused function argument: `dag_run` - airflow/listeners/spec/dagrun.py:36:41: ARG001 Unused function argument: `msg` - airflow/listeners/spec/dagrun.py:41:23: ARG001 Unused function argument: `dag_run` - airflow/listeners/spec/dagrun.py:41:40: ARG001 Unused function argument: `msg` - airflow/listeners/spec/dataset.py:32:5: ARG001 Unused function argument: `dataset` - airflow/listeners/spec/dataset.py:39:5: ARG001 Unused function argument: `dataset` - airflow/listeners/spec/importerrors.py:26:29: ARG001 Unused function argument: `filename` - airflow/listeners/spec/importerrors.py:26:39: ARG001 Unused function argument: `stacktrace` - airflow/listeners/spec/importerrors.py:31:34: ARG001 Unused function argument: `filename` - airflow/listeners/spec/importerrors.py:31:44: ARG001 Unused function argument: `stacktrace` - airflow/listeners/spec/lifecycle.py:26:17: ARG001 Unused function argument: `component` - airflow/listeners/spec/lifecycle.py:37:21: ARG001 Unused function argument: `component` - airflow/listeners/spec/taskinstance.py:35:47: ARG001 Unused function argument: `task_instance` - airflow/listeners/spec/taskinstance.py:35:5: ARG001 Unused function argument: `previous_state` - airflow/listeners/spec/taskinstance.py:35:76: ARG001 Unused function argument: `session` - airflow/listeners/spec/taskinstance.py:42:47: ARG001 Unused function argument: `task_instance` - airflow/listeners/spec/taskinstance.py:42:5: ARG001 Unused function argument: `previous_state` - airflow/listeners/spec/taskinstance.py:42:76: ARG001 Unused function argument: `session` - airflow/listeners/spec/taskinstance.py:49:5: ARG001 Unused function argument: `previous_state` - airflow/listeners/spec/taskinstance.py:50:5: ARG001 Unused function argument: `task_instance` - airflow/listeners/spec/taskinstance.py:51:5: ARG001 Unused function argument: `error` - airflow/listeners/spec/taskinstance.py:52:5: ARG001 Unused function argument: `session` - airflow/policies.py:109:31: ARG001 Unused function argument: `dag_file_path` - airflow/policies.py:36:17: ARG001 Unused function argument: `task` - airflow/policies.py:54:16: ARG001 Unused function argument: `dag` - airflow/policies.py:72:33: ARG001 Unused function argument: `task_instance` - airflow/policies.py:83:23: ARG001 Unused function argument: `pod` - airflow/policies.py:96:30: ARG001 Unused function argument: `context` ... 147 additional changes omitted for project
apache/superset (+0 -3 violations, +0 -0 fixes)
ruff check --no-cache --exit-zero --ignore RUF9 --output-format concise --preview --select ALL
- tests/integration_tests/advanced_data_type/api_tests.py:56:27: ARG001 Unused function argument: `col` - tests/integration_tests/advanced_data_type/api_tests.py:56:40: ARG001 Unused function argument: `op` - tests/integration_tests/advanced_data_type/api_tests.py:56:60: ARG001 Unused function argument: `values`
bokeh/bokeh (+0 -77 violations, +0 -0 fixes)
ruff check --no-cache --exit-zero --ignore RUF9 --output-format concise --preview --select ALL
- release/credentials.py:75:29: ARG001 Unused function argument: `config` - release/credentials.py:75:45: ARG001 Unused function argument: `system` - release/credentials.py:75:64: ARG001 Unused function argument: `token` - release/credentials.py:82:31: ARG001 Unused function argument: `config` - release/credentials.py:82:47: ARG001 Unused function argument: `system` - release/credentials.py:82:66: ARG001 Unused function argument: `token` - src/bokeh/application/handlers/lifecycle.py:135:17: ARG001 Unused function argument: `ignored` - src/bokeh/core/has_props.py:49:19: ARG001 Unused function argument: `arg` - src/bokeh/sphinxext/example_handler.py:85:20: ARG001 Unused function argument: `args` - src/bokeh/sphinxext/example_handler.py:85:28: ARG001 Unused function argument: `kw` - src/bokeh/util/terminal.py:72:12: ARG001 Unused function argument: `values` - src/bokeh/util/terminal.py:72:27: ARG001 Unused function argument: `kwargs` - tests/unit/bokeh/application/handlers/test_document_lifecycle.py:57:21: ARG001 Unused function argument: `a` ... 64 additional changes omitted for project
pypa/cibuildwheel (+1 -0 violations, +0 -0 fixes)
ruff check --no-cache --exit-zero --ignore RUF9 --output-format concise --preview
+ unit_test/main_tests/conftest.py:50:50: RUF100 [*] Unused `noqa` directive (unused: `ARG001`)
scikit-build/scikit-build-core (+1 -0 violations, +0 -0 fixes)
ruff check --no-cache --exit-zero --ignore RUF9 --output-format concise --preview
+ tests/test_get_requires.py:23:64: RUF100 [*] Unused `noqa` directive (unused: `ARG001`)
zulip/zulip (+0 -32 violations, +0 -0 fixes)
ruff check --no-cache --exit-zero --ignore RUF9 --output-format concise --preview --select ALL
- zerver/lib/markdown/__init__.py:419:22: ARG001 Unused function argument: `tweet_id` - zerver/lib/partial.py:36:17: ARG001 Unused function argument: `func` - zerver/lib/partial.py:36:45: ARG001 Unused function argument: `args` - zerver/lib/push_notifications.py:179:47: ARG001 Unused function argument: `result` - zerver/lib/push_notifications.py:179:9: ARG001 Unused function argument: `request` - zerver/tests/test_typed_endpoint.py:319:13: ARG001 Unused function argument: `request` - zerver/tests/test_typed_endpoint.py:321:13: ARG001 Unused function argument: `path_var_default` - zerver/tests/test_typed_endpoint.py:331:13: ARG001 Unused function argument: `request` - zerver/tests/test_typed_endpoint.py:333:13: ARG001 Unused function argument: `foo` - zerver/tests/test_typed_endpoint.py:337:13: ARG001 Unused function argument: `bar` ... 22 additional changes omitted for project
Changes by rule (2 rules affected)
| code | total | + violation | - violation | + fix | - fix |
|---|---|---|---|---|---|
| ARG001 | 289 | 0 | 289 | 0 | 0 |
| RUF100 | 2 | 2 | 0 | 0 | 0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
We already enforce this logic for the other
ARGrules. I'm guessing this was an oversight.Closes #12963.