Skip to content

[flake8-simplify] Stabilize split-static-string (SIM905) #16631

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

Merged
merged 1 commit into from
Mar 11, 2025

Conversation

ntBre
Copy link
Contributor

@ntBre ntBre commented Mar 11, 2025

Summary

Stabilizes SIM905 and adds a small addition to the docs. The test was already in the right place.

Test Plan

No issues except 2 recent, general issues about whitespace normalization.

Summary
--

Stabilizes SIM905 and adds a small addition to the docs. The test was already in
the right place.

Test Plan
--

No issues except 2 recent, general issues about whitespace normalization.
@ntBre ntBre added the rule Implementing or modifying a lint rule label Mar 11, 2025
@ntBre ntBre added this to the v0.10 milestone Mar 11, 2025
Copy link

codspeed-hq bot commented Mar 11, 2025

CodSpeed Performance Report

Merging #16631 will degrade performances by 12.87%

Comparing brent/sim905-0.10 (540697e) with micha/ruff-0.10 (303b061)

Summary

❌ 1 regressions
✅ 31 untouched benchmarks

⚠️ Please fix the performance issues or acknowledge them on CodSpeed.

Benchmarks breakdown

Benchmark BASE HEAD Change
red_knot_check_file[incremental] 4.8 ms 5.5 ms -12.87%

Copy link
Contributor

ruff-ecosystem results

Linter (stable)

ℹ️ ecosystem check detected linter changes. (+36 -0 violations, +0 -0 fixes in 7 projects; 48 projects unchanged)

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

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

+ airflow/example_dags/example_params_ui_tutorial.py:168:26: SIM905 [*] Consider using a list literal instead of `str.split`
+ scripts/ci/pre_commit/check_min_python_version.py:29:35: SIM905 [*] Consider using a list literal instead of `str.split`

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

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

+ superset/utils/date_parser.py:695:9: SIM905 [*] Consider using a list literal instead of `str.split`
+ tests/integration_tests/db_engine_specs/hive_tests.py:33:11: SIM905 [*] Consider using a list literal instead of `str.split`
+ tests/integration_tests/db_engine_specs/hive_tests.py:41:11: SIM905 [*] Consider using a list literal instead of `str.split`
+ tests/integration_tests/db_engine_specs/hive_tests.py:48:11: SIM905 [*] Consider using a list literal instead of `str.split`
+ tests/integration_tests/db_engine_specs/hive_tests.py:56:11: SIM905 [*] Consider using a list literal instead of `str.split`
+ tests/integration_tests/db_engine_specs/hive_tests.py:65:11: SIM905 [*] Consider using a list literal instead of `str.split`
+ tests/integration_tests/db_engine_specs/hive_tests.py:75:11: SIM905 [*] Consider using a list literal instead of `str.split`
+ tests/integration_tests/db_engine_specs/hive_tests.py:86:11: SIM905 [*] Consider using a list literal instead of `str.split`
+ tests/integration_tests/db_engine_specs/hive_tests.py:99:11: SIM905 [*] Consider using a list literal instead of `str.split`

binary-husky/gpt_academic (+1 -0 violations, +0 -0 fixes)

+ request_llms/edge_gpt_free.py:1048:46: SIM905 [*] Consider using a list literal instead of `str.split`

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

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

+ scripts/hooks/install.py:5:20: SIM905 [*] Consider using a list literal instead of `str.split`
+ scripts/hooks/uninstall.py:5:20: SIM905 [*] Consider using a list literal instead of `str.split`
+ scripts/sri.py:20:11: SIM905 [*] Consider using a list literal instead of `str.split`
+ src/bokeh/resources.py:674:11: SIM905 [*] Consider using a list literal instead of `str.split`

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

+ admin/tests/test_integration.py:542:27: SIM905 [*] Consider using a list literal instead of `str.split`
+ admin/tests/test_integration.py:547:27: SIM905 [*] Consider using a list literal instead of `str.split`
+ admin/tests/test_integration.py:642:27: SIM905 [*] Consider using a list literal instead of `str.split`
+ admin/tests/test_integration.py:643:27: SIM905 [*] Consider using a list literal instead of `str.split`
+ admin/tests/test_integration.py:646:27: SIM905 [*] Consider using a list literal instead of `str.split`
+ admin/tests/test_integration.py:675:27: SIM905 [*] Consider using a list literal instead of `str.split`
+ securedrop/pretty_bad_protocol/_parsers.py:1194:16: SIM905 [*] Consider using a list literal instead of `str.split`
+ securedrop/pretty_bad_protocol/_parsers.py:1233:16: SIM905 [*] Consider using a list literal instead of `str.split`
+ securedrop/pretty_bad_protocol/_parsers.py:1292:24: SIM905 [*] Consider using a list literal instead of `str.split`
+ securedrop/pretty_bad_protocol/_parsers.py:1400:24: SIM905 [*] Consider using a list literal instead of `str.split`
+ securedrop/pretty_bad_protocol/_parsers.py:671:30: SIM905 [*] Consider using a list literal instead of `str.split`
+ securedrop/pretty_bad_protocol/gnupg.py:565:26: SIM905 [*] Consider using a list literal instead of `str.split`

scikit-build/scikit-build-core (+3 -0 violations, +0 -0 fixes)

+ tests/test_skbuild_settings.py:395:12: SIM905 [*] Consider using a list literal instead of `str.split`
+ tests/test_skbuild_settings.py:435:12: SIM905 [*] Consider using a list literal instead of `str.split`
+ tests/test_skbuild_settings.py:747:12: SIM905 [*] Consider using a list literal instead of `str.split`

astropy/astropy (+5 -0 violations, +0 -0 fixes)

+ astropy/coordinates/tests/test_polarization.py:39:29: SIM905 [*] Consider using a list literal instead of `str.split`
+ astropy/io/ascii/tests/test_ecsv.py:953:16: SIM905 [*] Consider using a list literal instead of `str.split`
+ astropy/table/tests/test_info.py:57:36: SIM905 [*] Consider using a list literal instead of `str.split`
+ astropy/units/tests/test_quantity_erfa_ufuncs.py:519:25: SIM905 [*] Consider using a list literal instead of `str.split`
+ astropy/units/tests/test_quantity_erfa_ufuncs.py:523:25: SIM905 [*] Consider using a list literal instead of `str.split`

Changes by rule (1 rules affected)

code total + violation - violation + fix - fix
SIM905 36 36 0 0 0

Linter (preview)

✅ ecosystem check detected no linter changes.

@ntBre
Copy link
Contributor Author

ntBre commented Mar 11, 2025

All of the ecosystem checks look like true positives. I think the codspeed results should be unrelated to these changes?

@MichaReiser
Copy link
Member

All of the ecosystem checks look like true positives. I think the codspeed results should be unrelated to these changes?

Yeah, codspeed is probably confused about the base. We might need to rebase the base branch. But let's wait until we merged almost all outstanding PRs

@ntBre ntBre merged commit 1898702 into micha/ruff-0.10 Mar 11, 2025
20 of 21 checks passed
@ntBre ntBre deleted the brent/sim905-0.10 branch March 11, 2025 17:53
@ntBre ntBre mentioned this pull request Mar 11, 2025
2 tasks
MichaReiser pushed a commit that referenced this pull request Mar 13, 2025
Summary
--

Stabilizes SIM905 and adds a small addition to the docs. The test was
already in the right place.

Test Plan
--

No issues except 2 recent, general issues about whitespace
normalization.
MichaReiser pushed a commit that referenced this pull request Mar 13, 2025
Summary
--

Stabilizes SIM905 and adds a small addition to the docs. The test was
already in the right place.

Test Plan
--

No issues except 2 recent, general issues about whitespace
normalization.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
rule Implementing or modifying a lint rule
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants