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-operator and multiple-spaces-before-operator #8623

Merged
merged 1 commit into from
Nov 11, 2023

Conversation

charliermarsh
Copy link
Member

No description provided.

@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:34
@charliermarsh charliermarsh force-pushed the charlie/fix2 branch 2 times, most recently from cadfbe1 to 1ae0cd5 Compare November 11, 2023 23:40
@charliermarsh charliermarsh merged commit 96b265c into main Nov 11, 2023
16 checks passed
@charliermarsh charliermarsh deleted the charlie/fix2 branch November 11, 2023 23:46
Copy link
Contributor

ruff-ecosystem results

Linter (stable)

✅ ecosystem check detected no linter changes.

Linter (preview)

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

DisnakeDev/disnake (+0 -0 violations, +118 -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:344:17: E221 Multiple spaces before operator
+ disnake/enums.py:344:17: E221 [*] Multiple spaces before operator
- disnake/enums.py:345:19: E221 Multiple spaces before operator
+ disnake/enums.py:345:19: E221 [*] Multiple spaces before operator
- disnake/enums.py:346:19: E221 Multiple spaces before operator
+ disnake/enums.py:346:19: E221 [*] Multiple spaces before operator
... 105 additional changes omitted for rule E221
... 108 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, +28 -0 fixes)

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

- tests/integration/testdata/start_api/lambda_authorizers/app.py:131:8: E221 Multiple spaces before operator
+ tests/integration/testdata/start_api/lambda_authorizers/app.py:131:8: E221 [*] Multiple spaces before operator
- tests/integration/testdata/start_api/lambda_authorizers/app.py:132:9: E221 Multiple spaces before operator
+ tests/integration/testdata/start_api/lambda_authorizers/app.py:132:9: E221 [*] Multiple spaces before operator
- tests/integration/testdata/start_api/lambda_authorizers/app.py:133:8: E221 Multiple spaces before operator
+ tests/integration/testdata/start_api/lambda_authorizers/app.py:133:8: E221 [*] Multiple spaces before operator
... 9 additional changes omitted for rule E221
- 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
... 18 additional changes omitted for project

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

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

- docs/bokeh/source/conf.py:183:29: E241 Multiple spaces after comma
+ docs/bokeh/source/conf.py:183:29: E241 [*] Multiple spaces after comma
- examples/advanced/extensions/gears/gears.py:103:10: E221 Multiple spaces before operator
+ examples/advanced/extensions/gears/gears.py:103:10: E221 [*] Multiple spaces before operator
- examples/advanced/extensions/gears/gears.py:104:10: E221 Multiple spaces before operator
+ examples/advanced/extensions/gears/gears.py:104:10: E221 [*] Multiple spaces before operator
- examples/advanced/integration/d3-voronoi.py:10:4: E222 Multiple spaces after operator
+ examples/advanced/integration/d3-voronoi.py:10:4: E222 [*] Multiple spaces after operator
- examples/advanced/integration/d3-voronoi.py:11:2: E221 Multiple spaces before operator
+ examples/advanced/integration/d3-voronoi.py:11:2: E221 [*] Multiple spaces before operator
- examples/basic/annotations/legend.py:21:13: E241 Multiple spaces after comma
+ examples/basic/annotations/legend.py:21:13: E241 [*] Multiple spaces after comma
- examples/basic/bars/dodged.py:30:25: E241 Multiple spaces after comma
+ examples/basic/bars/dodged.py:30:25: E241 [*] Multiple spaces after comma
- examples/basic/bars/dodged.py:30:31: E241 Multiple spaces after comma
+ examples/basic/bars/dodged.py:30:31: E241 [*] Multiple spaces after comma
- examples/basic/bars/dodged.py:33:25: E241 Multiple spaces after comma
+ examples/basic/bars/dodged.py:33:25: E241 [*] Multiple spaces after comma
- examples/basic/data/color_mappers.py:48:7: E222 Multiple spaces after operator
+ examples/basic/data/color_mappers.py:48:7: E222 [*] Multiple spaces after operator
- examples/basic/layouts/anscombe.py:47:42: E241 Multiple spaces after comma
... 2688 additional changes omitted for rule E241
- examples/basic/layouts/anscombe.py:53:2: E221 Multiple spaces before operator
+ examples/basic/layouts/anscombe.py:53:2: E221 [*] Multiple spaces before operator
- examples/basic/layouts/anscombe.py:54:3: E221 Multiple spaces before operator
+ examples/basic/layouts/anscombe.py:54:3: E221 [*] Multiple spaces before operator
- examples/basic/layouts/anscombe.py:56:3: E221 Multiple spaces before operator
... 1006 additional changes omitted for rule E221
- examples/interaction/widgets/autocompleteinput.py:7:22: E222 Multiple spaces after operator
+ examples/interaction/widgets/autocompleteinput.py:7:22: E222 [*] Multiple spaces after operator
- examples/models/trail.py:44:44: E222 Multiple spaces after operator
+ examples/models/trail.py:44:44: E222 [*] Multiple spaces after operator
- examples/models/trail.py:45:29: E222 Multiple spaces after operator
+ examples/models/trail.py:45:29: E222 [*] Multiple spaces after operator
- examples/models/trail.py:45:44: E222 Multiple spaces after operator
... 32 additional changes omitted for rule E222
- 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/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/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
+ src/bokeh/models/tools.py:1862:28: PLW0108 [*] Lambda may be unnecessary; consider inlining inner function
- src/bokeh/models/tools.py:1864:34: PLW0108 Lambda may be unnecessary; consider inlining inner function
... 3788 additional changes omitted for project

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

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

- common/transformations/camera.py:17:23: E241 Multiple spaces after comma
+ common/transformations/camera.py:17:23: E241 [*] Multiple spaces after comma
- common/transformations/camera.py:17:29: E241 Multiple spaces after comma
+ common/transformations/camera.py:17:29: E241 [*] Multiple spaces after comma
- common/transformations/camera.py:18:29: E241 Multiple spaces after comma
+ common/transformations/camera.py:18:29: E241 [*] Multiple spaces after comma
... 343 additional changes omitted for rule E241
- common/transformations/tests/test_coordinates.py:40:61: E221 Multiple spaces before operator
+ common/transformations/tests/test_coordinates.py:40:61: E221 [*] Multiple spaces before operator
- common/transformations/tests/test_coordinates.py:41:61: E221 Multiple spaces before operator
+ common/transformations/tests/test_coordinates.py:41:61: E221 [*] Multiple spaces before operator
... 380 additional changes omitted for project

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

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

Changes by rule (4 rules affected)

code total + violation - violation + fix - fix
E241 3046 0 0 3046 0
E221 1178 0 0 1178 0
PLW0108 247 0 55 192 0
E222 46 0 0 46 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.

1 participant