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

Implement autofix for multiple-spaces-after-keyword and multiple-spaces-before-keyword #8622

Merged
merged 1 commit into from
Nov 11, 2023

Conversation

charliermarsh
Copy link
Member

Closes #8312.

@charliermarsh charliermarsh changed the title Implement autofix for multiple-spaces-after-keyword and `multiple-spaces-before-keyword Implement autofix for multiple-spaces-after-keyword and multiple-spaces-before-keyword Nov 11, 2023
@charliermarsh charliermarsh added the fixes Related to suggested fixes for violations label Nov 11, 2023
@charliermarsh charliermarsh enabled auto-merge (squash) November 11, 2023 23:36
@charliermarsh charliermarsh merged commit e0a0ddc into main Nov 11, 2023
16 checks passed
@charliermarsh charliermarsh deleted the charlie/fix branch November 11, 2023 23:41
Copy link
Contributor

ruff-ecosystem results

Linter (stable)

✅ ecosystem check detected no linter changes.

Linter (preview)

ℹ️ ecosystem check detected linter changes. (+0 -52 violations, +286 -0 fixes in 41 projects)

DisnakeDev/disnake (+0 -0 violations, +36 -0 fixes)

ruff check --no-cache --exit-zero --preview

- disnake/client.py:1261:52: PLW0108 Lambda may be unnecessary; consider inlining inner function
+ disnake/client.py:1261:52: PLW0108 [*] Lambda may be unnecessary; consider inlining inner function
- disnake/client.py:1262:53: PLW0108 Lambda may be unnecessary; consider inlining inner function
+ disnake/client.py:1262:53: PLW0108 [*] Lambda may be unnecessary; consider inlining inner function
- disnake/enums.py:413:33: E272 Multiple spaces before keyword
+ disnake/enums.py:413:33: E272 [*] Multiple spaces before keyword
- disnake/enums.py:414:41: E272 Multiple spaces before keyword
+ disnake/enums.py:414:41: E272 [*] Multiple spaces before keyword
- disnake/enums.py:415:32: E272 Multiple spaces before keyword
+ disnake/enums.py:415:32: E272 [*] Multiple spaces before keyword
... 23 additional changes omitted for rule E272
... 26 additional changes omitted for project

apache/airflow (+0 -0 violations, +6 -0 fixes)

ruff check --no-cache --exit-zero --select ALL --preview

- dev/prepare_release_issue.py:268:46: PLW0108 Lambda may be unnecessary; consider inlining inner function
+ dev/prepare_release_issue.py:268:46: PLW0108 [*] Lambda may be unnecessary; consider inlining inner function
- scripts/ci/pre_commit/pre_commit_check_provider_docs.py:48:57: PLW0108 Lambda may be unnecessary; consider inlining inner function
+ scripts/ci/pre_commit/pre_commit_check_provider_docs.py:48:57: PLW0108 [*] Lambda may be unnecessary; consider inlining inner function
- scripts/ci/pre_commit/pre_commit_update_providers_dependencies.py:52:56: PLW0108 Lambda may be unnecessary; consider inlining inner function
+ scripts/ci/pre_commit/pre_commit_update_providers_dependencies.py:52:56: PLW0108 [*] Lambda may be unnecessary; consider inlining inner function

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

ruff check --no-cache --exit-zero --preview

- tests/unit/commands/local/lib/test_stack_provider.py:114:51: PLW0108 Lambda may be unnecessary; consider inlining inner function
+ tests/unit/commands/local/lib/test_stack_provider.py:114:51: PLW0108 [*] Lambda may be unnecessary; consider inlining inner function
- tests/unit/commands/local/lib/test_stack_provider.py:152:51: PLW0108 Lambda may be unnecessary; consider inlining inner function
+ tests/unit/commands/local/lib/test_stack_provider.py:152:51: PLW0108 [*] Lambda may be unnecessary; consider inlining inner function
- tests/unit/commands/local/lib/test_stack_provider.py:190:51: PLW0108 Lambda may be unnecessary; consider inlining inner function
+ tests/unit/commands/local/lib/test_stack_provider.py:190:51: PLW0108 [*] Lambda may be unnecessary; consider inlining inner function
- tests/unit/commands/local/lib/test_stack_provider.py:229:51: PLW0108 Lambda may be unnecessary; consider inlining inner function
+ tests/unit/commands/local/lib/test_stack_provider.py:229:51: PLW0108 [*] Lambda may be unnecessary; consider inlining inner function
- tests/unit/commands/local/lib/test_stack_provider.py:270:51: PLW0108 Lambda may be unnecessary; consider inlining inner function
+ tests/unit/commands/local/lib/test_stack_provider.py:270:51: PLW0108 [*] Lambda may be unnecessary; consider inlining inner function
... 4 additional changes omitted for project

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

ruff check --no-cache --exit-zero --select ALL --preview

- examples/server/app/ohlc/main.py:86:7: E271 Multiple spaces after keyword
+ examples/server/app/ohlc/main.py:86:7: E271 [*] Multiple spaces after keyword
- examples/server/app/surface3d/surface3d.py:13:16: E272 Multiple spaces before keyword
+ examples/server/app/surface3d/surface3d.py:13:16: E272 [*] Multiple spaces before keyword
- src/bokeh/core/property/dataspec.py:201:71: PLW0108 Lambda may be unnecessary; consider inlining inner function
+ src/bokeh/core/property/dataspec.py:201:71: PLW0108 [*] Lambda may be unnecessary; consider inlining inner function
- src/bokeh/core/query.py:108:11: E271 Multiple spaces after keyword
+ src/bokeh/core/query.py:108:11: E271 [*] Multiple spaces after keyword
- src/bokeh/core/query.py:353:7: E272 Multiple spaces before keyword
+ src/bokeh/core/query.py:353:7: E272 [*] Multiple spaces before keyword
- src/bokeh/core/query.py:354:7: E272 Multiple spaces before keyword
+ src/bokeh/core/query.py:354:7: E272 [*] Multiple spaces before keyword
- src/bokeh/core/query.py:355:7: E272 Multiple spaces before keyword
... 52 additional changes omitted for rule E272
- src/bokeh/io/webdriver.py:217:17: PLW0108 Lambda may be unnecessary; consider inlining inner function
+ src/bokeh/io/webdriver.py:217:17: PLW0108 [*] Lambda may be unnecessary; consider inlining inner function
- src/bokeh/model/model.py:84:40: E271 Multiple spaces after keyword
+ src/bokeh/model/model.py:84:40: E271 [*] Multiple spaces after keyword
- src/bokeh/models/tools.py:1354:101: PLW0108 Lambda may be unnecessary; consider inlining inner function
+ src/bokeh/models/tools.py:1354:101: PLW0108 [*] Lambda may be unnecessary; consider inlining inner function
- src/bokeh/models/tools.py:1862:28: PLW0108 Lambda may be unnecessary; consider inlining inner function
... 68 additional changes omitted for rule PLW0108
... 118 additional changes omitted for project

commaai/openpilot (+0 -0 violations, +2 -0 fixes)

ruff check --no-cache --exit-zero --preview

- selfdrive/test/process_replay/regen.py:67:26: E271 Multiple spaces after keyword
+ selfdrive/test/process_replay/regen.py:67:26: E271 [*] Multiple spaces after keyword

freedomofpress/securedrop (+0 -0 violations, +2 -0 fixes)

ruff check --no-cache --exit-zero --preview

- securedrop/pretty_bad_protocol/gnupg.py:657:26: PLW0108 Lambda may be unnecessary; consider inlining inner function
+ securedrop/pretty_bad_protocol/gnupg.py:657:26: PLW0108 [*] Lambda may be unnecessary; consider inlining inner function

fronzbot/blinkpy (+0 -0 violations, +10 -0 fixes)

ruff check --no-cache --exit-zero --preview

- tests/test_blink_functions.py:191:13: PLW0108 Lambda may be unnecessary; consider inlining inner function
+ tests/test_blink_functions.py:191:13: PLW0108 [*] Lambda may be unnecessary; consider inlining inner function
- tests/test_sync_module.py:591:13: PLW0108 Lambda may be unnecessary; consider inlining inner function
+ tests/test_sync_module.py:591:13: PLW0108 [*] Lambda may be unnecessary; consider inlining inner function
- tests/test_util.py:146:13: PLW0108 Lambda may be unnecessary; consider inlining inner function
+ tests/test_util.py:146:13: PLW0108 [*] Lambda may be unnecessary; consider inlining inner function
- tests/test_util.py:160:13: PLW0108 Lambda may be unnecessary; consider inlining inner function
+ tests/test_util.py:160:13: PLW0108 [*] Lambda may be unnecessary; consider inlining inner function
- tests/test_util.py:177:13: PLW0108 Lambda may be unnecessary; consider inlining inner function
+ tests/test_util.py:177:13: PLW0108 [*] Lambda may be unnecessary; consider inlining inner function

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

ruff check --no-cache --exit-zero --preview

- docs/backends/app/backend_info_app.py:23:28: PLW0108 Lambda may be unnecessary; consider inlining inner function
+ docs/backends/app/backend_info_app.py:23:28: PLW0108 [*] Lambda may be unnecessary; consider inlining inner function
- ibis/backends/dask/execution/reductions.py:47:29: PLW0108 Lambda may be unnecessary; consider inlining inner function
+ ibis/backends/dask/execution/reductions.py:47:29: PLW0108 [*] Lambda may be unnecessary; consider inlining inner function
- ibis/backends/impala/tests/test_value_exprs.py:236:9: PLW0108 Lambda may be unnecessary; consider inlining inner function
+ ibis/backends/impala/tests/test_value_exprs.py:236:9: PLW0108 [*] Lambda may be unnecessary; consider inlining inner function
- ibis/backends/mssql/registry.py:198:30: PLW0108 Lambda may be unnecessary; consider inlining inner function
+ ibis/backends/mssql/registry.py:198:30: PLW0108 [*] Lambda may be unnecessary; consider inlining inner function
- ibis/backends/mysql/registry.py:231:13: PLW0108 Lambda may be unnecessary; consider inlining inner function
+ ibis/backends/mysql/registry.py:231:13: PLW0108 [*] Lambda may be unnecessary; consider inlining inner function
... 38 additional changes omitted for project

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

ruff check --no-cache --exit-zero --preview

- asv_bench/benchmarks/groupby.py:907:49: PLW0108 Lambda may be unnecessary; consider inlining inner function
- asv_bench/benchmarks/io/csv.py:342:25: PLW0108 Lambda may be unnecessary; consider inlining inner function
- pandas/_testing/__init__.py:843:16: PLW0108 Lambda may be unnecessary; consider inlining inner function
- pandas/_testing/__init__.py:847:16: PLW0108 Lambda may be unnecessary; consider inlining inner function
- pandas/_testing/__init__.py:855:16: PLW0108 Lambda may be unnecessary; consider inlining inner function
- pandas/_testing/__init__.py:859:16: PLW0108 Lambda may be unnecessary; consider inlining inner function
- pandas/core/_numba/extensions.py:279:16: PLW0108 Lambda may be unnecessary; consider inlining inner function
- pandas/io/formats/style_render.py:1829:18: PLW0108 Lambda may be unnecessary; consider inlining inner function
- pandas/tests/apply/test_frame_apply.py:1049:25: PLW0108 Lambda may be unnecessary; consider inlining inner function
- pandas/tests/apply/test_frame_apply.py:1049:6: PLW0108 Lambda may be unnecessary; consider inlining inner function
... 41 additional changes omitted for project

python/mypy (+0 -1 violations, +0 -0 fixes)

ruff check --no-cache --exit-zero --preview

- mypy/types.py:3329:95: E272 Multiple spaces before keyword

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

Changes by rule (3 rules affected)

code total + violation - violation + fix - fix
PLW0108 243 0 51 192 0
E272 87 0 1 86 0
E271 8 0 0 8 0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fixes Related to suggested fixes for violations
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Autofix whitespace before or after keyword E prefix (preview)
1 participant