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

Use of unused marked variables #2

Closed
wants to merge 8 commits into from

Conversation

Lokejoke
Copy link
Owner

Summary

Test Plan

@Lokejoke Lokejoke marked this pull request as ready for review November 14, 2024 08:30
Copy link

ruff-ecosystem results

Linter (stable)

✅ ecosystem check detected no linter changes.

Linter (preview)

ℹ️ ecosystem check detected linter changes. (+727 -1491 violations, +0 -0 fixes in 4 projects; 50 projects unchanged)

apache/airflow (+291 -1208 violations, +0 -0 fixes)

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

+ airflow/api_connexion/endpoints/pool_endpoint.py:135:9: WPS121 Local variable `_patch_body` is marked as unused but is used
+ airflow/assets/manager.py:282:5: WPS121 Local variable `_asset_manager_class` is marked as unused but is used
+ airflow/assets/manager.py:287:5: WPS121 Local variable `_asset_manager_kwargs` is marked as unused but is used
+ airflow/cli/cli_config.py:599:1: WPS116 Variable name ARG_DB_VERSION__UPGRADE contains consecutive underscors inside.
+ airflow/cli/cli_config.py:606:1: WPS116 Variable name ARG_DB_REVISION__UPGRADE contains consecutive underscors inside.
+ airflow/cli/cli_config.py:610:1: WPS116 Variable name ARG_DB_VERSION__DOWNGRADE contains consecutive underscors inside.
+ airflow/cli/cli_config.py:618:1: WPS116 Variable name ARG_DB_REVISION__DOWNGRADE contains consecutive underscors inside.
+ airflow/cli/commands/connection_command.py:152:5: WPS121 Local variable `_connection_types` is marked as unused but is used
+ airflow/cli/commands/info_command.py:263:9: WPS121 Local variable `_locale` is marked as unused but is used
+ airflow/cli/commands/task_command.py:439:9: WPS121 Local variable `_dag` is marked as unused but is used
... 163 additional changes omitted for rule WPS121
+ airflow/jobs/scheduler_job_runner.py:862:9: WPS116 Function name _set_span_attrs__process_executor_events contains consecutive underscors inside.
- airflow/lineage/hook.py:100:9: D212 [*] Multi-line docstring summary should start at the first line
- airflow/lineage/hook.py:115:13: DOC201 `return` is not documented in docstring
- airflow/lineage/hook.py:119:108: COM812 [*] Trailing comma missing
- airflow/lineage/hook.py:131:16: BLE001 Do not catch blind exception: `Exception`
- airflow/lineage/hook.py:135:9: ANN201 Missing return type annotation for public function `add_input_asset`
- airflow/lineage/hook.py:151:9: ANN201 Missing return type annotation for public function `add_output_asset`
- airflow/lineage/hook.py:188:5: D212 [*] Multi-line docstring summary should start at the first line
- airflow/lineage/hook.py:194:31: ANN002 Missing type annotation for `*_`
- airflow/lineage/hook.py:194:35: ANN003 Missing type annotation for `**__`
- airflow/lineage/hook.py:194:9: ANN201 Missing return type annotation for public function `add_input_asset`
- airflow/lineage/hook.py:194:9: D102 Missing docstring in public method
- airflow/lineage/hook.py:197:32: ANN002 Missing type annotation for `*_`
- airflow/lineage/hook.py:197:36: ANN003 Missing type annotation for `**__`
- airflow/lineage/hook.py:197:9: ANN201 Missing return type annotation for public function `add_output_asset`
- airflow/lineage/hook.py:197:9: D102 Missing docstring in public method
- airflow/lineage/hook.py:1:1: CPY001 Missing copyright notice at top of file
- airflow/lineage/hook.py:1:1: D100 Missing docstring in public module
- airflow/lineage/hook.py:201:9: D102 Missing docstring in public method
- airflow/lineage/hook.py:205:111: E501 Line too long (111 > 110)
- airflow/lineage/hook.py:205:112: COM812 [*] Trailing comma missing
- airflow/lineage/hook.py:213:24: ANN003 Missing type annotation for `**kwargs`
- airflow/lineage/hook.py:213:26: ARG002 Unused method argument: `kwargs`
... 1466 additional changes omitted for project

apache/superset (+129 -159 violations, +0 -0 fixes)

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

+ superset/connectors/sqla/models.py:461:17: WPS121 Local variable `_columns` is marked as unused but is used
- superset/db_engine_specs/databricks.py:108:5: D200 One-line docstring should fit on one line
- superset/db_engine_specs/databricks.py:108:5: D212 [*] Multi-line docstring summary should start at the first line
- superset/db_engine_specs/databricks.py:118:5: D200 One-line docstring should fit on one line
- superset/db_engine_specs/databricks.py:118:5: D212 [*] Multi-line docstring summary should start at the first line
- superset/db_engine_specs/databricks.py:128:5: D205 1 blank line required between summary line and description
- superset/db_engine_specs/databricks.py:128:5: D212 [*] Multi-line docstring summary should start at the first line
- superset/db_engine_specs/databricks.py:156:7: D101 Missing docstring in public class
- superset/db_engine_specs/databricks.py:160:15: RUF012 Mutable class attributes should be annotated with `typing.ClassVar`
- superset/db_engine_specs/databricks.py:168:7: D101 Missing docstring in public class
... 278 additional changes omitted for project

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

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

+ examples/server/app/spectrogram/audio.py:59:13: WPS121 Local variable `_f_carrier` is marked as unused but is used
+ examples/server/app/spectrogram/audio.py:60:13: WPS121 Local variable `_f_mod` is marked as unused but is used
+ examples/server/app/spectrogram/audio.py:61:13: WPS121 Local variable `_ind_mod` is marked as unused but is used
+ src/bokeh/application/handlers/code_runner.py:219:9: WPS121 Local variable `_cwd` is marked as unused but is used
+ src/bokeh/application/handlers/code_runner.py:220:9: WPS121 Local variable `_sys_path` is marked as unused but is used
+ src/bokeh/application/handlers/code_runner.py:221:9: WPS121 Local variable `_sys_argv` is marked as unused but is used
... 26 additional changes omitted for rule WPS121
+ tests/support/util/api.py:47:11: WPS116 Class name Test___all__ contains consecutive underscors inside.
+ tests/support/util/api.py:59:13: WPS116 Function name test___all__ contains consecutive underscors inside.
+ tests/unit/bokeh/_testing/util/test_env.py:43:1: WPS116 Variable name Test___all__ contains consecutive underscors inside.
+ tests/unit/bokeh/application/handlers/test___init___handlers.py:55:1: WPS116 Variable name Test___all__ contains consecutive underscors inside.
... 272 additional changes omitted for project

zulip/zulip (+25 -124 violations, +0 -0 fixes)

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

+ analytics/tests/test_counts.py:1035:9: WPS121 Local variable `_1day` is marked as unused but is used
+ analytics/tests/test_counts.py:1058:9: WPS121 Local variable `_15day` is marked as unused but is used
+ analytics/tests/test_counts.py:1108:9: WPS121 Local variable `_15day` is marked as unused but is used
+ analytics/tests/test_counts.py:985:9: WPS121 Local variable `_1day` is marked as unused but is used
+ corporate/lib/stripe.py:1819:17: WPS121 Local variable `_price_per_license` is marked as unused but is used
+ zerver/data_import/slack.py:496:5: WPS121 Local variable `_default_timezone` is marked as unused but is used
... 8 additional changes omitted for rule WPS121
+ zerver/lib/message_cache.py:28:5: WPS116 Annotation name user_profile__email contains consecutive underscors inside.
+ zerver/lib/message_cache.py:29:5: WPS116 Annotation name user_profile__full_name contains consecutive underscors inside.
+ zerver/lib/soft_deactivation.py:38:5: WPS116 Annotation name recipient__type_id contains consecutive underscors inside.
+ zerver/lib/topic.py:59:1: WPS116 Variable name MESSAGE__TOPIC contains consecutive underscors inside.
... 139 additional changes omitted for project

Changes by rule (109 rules affected)

code total + violation - violation + fix - fix
WPS116 474 474 0 0 0
ANN001 412 0 412 0 0
WPS121 251 251 0 0 0
ANN201 198 0 198 0 0
COM812 170 0 170 0 0
PT019 76 0 76 0 0
ARG002 60 0 60 0 0
D102 35 0 35 0 0
SLF001 33 0 33 0 0
PLR6301 32 0 32 0 0
D212 29 1 28 0 0
D103 27 0 27 0 0
PLC0415 24 0 24 0 0
ANN202 21 0 21 0 0
C408 20 0 20 0 0
CPY001 18 0 18 0 0
ANN002 16 0 16 0 0
ANN003 16 0 16 0 0
DOC201 15 0 15 0 0
T201 14 0 14 0 0
ARG001 11 0 11 0 0
RUF012 11 0 11 0 0
F841 11 0 11 0 0
D200 10 1 9 0 0
PGH003 10 0 10 0 0
D205 10 0 10 0 0
AIR001 9 0 9 0 0
ANN204 8 0 8 0 0
D101 8 0 8 0 0
PLR0913 7 0 7 0 0
S108 7 0 7 0 0
D100 6 0 6 0 0
SIM117 6 0 6 0 0
SIM910 6 0 6 0 0
D400 6 0 6 0 0
PLC1901 5 0 5 0 0
D415 5 0 5 0 0
D401 5 0 5 0 0
N806 4 0 4 0 0
C901 4 0 4 0 0
PLR0917 4 0 4 0 0
PTH123 4 0 4 0 0
ARG003 4 0 4 0 0
PTH118 4 0 4 0 0
D202 4 0 4 0 0
S101 4 0 4 0 0
PLR0915 3 0 3 0 0
PLW2901 3 0 3 0 0
FBT003 3 0 3 0 0
RUF005 3 0 3 0 0
TRY003 3 0 3 0 0
EM101 3 0 3 0 0
PTH107 3 0 3 0 0
ANN401 3 0 3 0 0
PLR0912 3 0 3 0 0
E501 2 0 2 0 0
D107 2 0 2 0 0
PLW0603 2 0 2 0 0
E731 2 0 2 0 0
B015 2 0 2 0 0
PT006 2 0 2 0 0
ARG004 2 0 2 0 0
PLR2004 2 0 2 0 0
PLC2701 2 0 2 0 0
S105 2 0 2 0 0
TCH003 2 0 2 0 0
ERA001 2 0 2 0 0
FURB101 2 0 2 0 0
PLW1514 2 0 2 0 0
FIX002 2 0 2 0 0
TD002 2 0 2 0 0
TD003 2 0 2 0 0
TCH002 2 0 2 0 0
TRY300 2 0 2 0 0
D404 2 0 2 0 0
A001 2 0 2 0 0
SIM108 2 0 2 0 0
B007 2 0 2 0 0
BLE001 1 0 1 0 0
RET504 1 0 1 0 0
S324 1 0 1 0 0
N813 1 0 1 0 0
S606 1 0 1 0 0
B010 1 0 1 0 0
PLW0108 1 0 1 0 0
RUF022 1 0 1 0 0
RET501 1 0 1 0 0
S608 1 0 1 0 0
FBT002 1 0 1 0 0
S404 1 0 1 0 0
PLR0904 1 0 1 0 0
PLR1704 1 0 1 0 0
PTH120 1 0 1 0 0
PTH110 1 0 1 0 0
ANN206 1 0 1 0 0
DTZ001 1 0 1 0 0
UP007 1 0 1 0 0
TRY002 1 0 1 0 0
D105 1 0 1 0 0
UP035 1 0 1 0 0
RUF031 1 0 1 0 0
PLR6201 1 0 1 0 0
A002 1 0 1 0 0
RET505 1 0 1 0 0
DOC501 1 0 1 0 0
D209 1 0 1 0 0
SIM103 1 0 1 0 0
PLR0914 1 0 1 0 0
FBT001 1 0 1 0 0

@Lokejoke Lokejoke closed this Nov 16, 2024
@Lokejoke Lokejoke deleted the use-of-unused-marked-variables branch November 16, 2024 17:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants