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

[pyupgrade] Allow fixes for f-string rule regardless of line length (UP032) #10263

Merged
merged 1 commit into from Mar 7, 2024

Conversation

charliermarsh
Copy link
Member

Summary

This is a follow-up to #10238 to offer fixes for the f-string rule regardless of the line length of the resulting fix. To quote Alex in the linked PR:

Yes, from the user's perspective I'd rather have a fix that may lead to line length issues than have to fix them myself :-) Cleaning up line lengths is easier than changing from "".format() to f""

I agree with this position, which is that if we're going to offer a diagnostic, we should really be offering the user the ability to fix it -- otherwise, we're just inconveniencing them.

@charliermarsh charliermarsh added the fixes Related to suggested fixes for violations label Mar 7, 2024
Copy link
Contributor

github-actions bot commented Mar 7, 2024

ruff-ecosystem results

Linter (stable)

ℹ️ ecosystem check detected linter changes. (+0 -0 violations, +452 -0 fixes in 12 projects; 31 projects unchanged)

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

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

- tests/conftest.py:492:13: UP032 Use f-string instead of `format` call
+ tests/conftest.py:492:13: UP032 [*] Use f-string instead of `format` call

demisto/content (+0 -0 violations, +134 -0 fixes)

- Packs/Active_Directory_Query/Integrations/Active_Directory_Query/Active_Directory_Query.py:865:17: UP032 Use f-string instead of `format` call
+ Packs/Active_Directory_Query/Integrations/Active_Directory_Query/Active_Directory_Query.py:865:17: UP032 [*] Use f-string instead of `format` call
- Packs/ArcSightESM/Integrations/ArcSightESMv2/ArcSightESMv2.py:562:13: UP032 Use f-string instead of `format` call
+ Packs/ArcSightESM/Integrations/ArcSightESMv2/ArcSightESMv2.py:562:13: UP032 [*] Use f-string instead of `format` call
- Packs/ArcSightESM/Integrations/ArcSightESMv2/ArcSightESMv2.py:737:22: UP032 Use f-string instead of `format` call
+ Packs/ArcSightESM/Integrations/ArcSightESMv2/ArcSightESMv2.py:737:22: UP032 [*] Use f-string instead of `format` call
- Packs/ArcSightESM/Integrations/ArcSightESMv2/ArcSightESMv2.py:809:13: UP032 Use f-string instead of `format` call
+ Packs/ArcSightESM/Integrations/ArcSightESMv2/ArcSightESMv2.py:809:13: UP032 [*] Use f-string instead of `format` call
- Packs/ArcSightESM/Integrations/ArcSightESMv2/ArcSightESMv2.py:887:26: UP032 Use f-string instead of `format` call
+ Packs/ArcSightESM/Integrations/ArcSightESMv2/ArcSightESMv2.py:887:26: UP032 [*] Use f-string instead of `format` call
- Packs/AttivoBotsink/Integrations/AttivoBotsink/AttivoBotsink.py:752:25: UP032 Use f-string instead of `format` call
+ Packs/AttivoBotsink/Integrations/AttivoBotsink/AttivoBotsink.py:752:25: UP032 [*] Use f-string instead of `format` call
- Packs/Base/Scripts/DBotPreprocessTextData/DBotPreprocessTextData.py:429:26: UP032 Use f-string instead of `format` call
+ Packs/Base/Scripts/DBotPreprocessTextData/DBotPreprocessTextData.py:429:26: UP032 [*] Use f-string instead of `format` call
... 120 additional changes omitted for project

docker/docker-py (+0 -0 violations, +6 -0 fixes)

- tests/unit/api_exec_test.py:14:51: UP032 Use f-string instead of `format` call
+ tests/unit/api_exec_test.py:14:51: UP032 [*] Use f-string instead of `format` call
- tests/unit/errors_test.py:128:15: UP032 Use f-string instead of `format` call
+ tests/unit/errors_test.py:128:15: UP032 [*] Use f-string instead of `format` call
- tests/unit/errors_test.py:142:15: UP032 Use f-string instead of `format` call
+ tests/unit/errors_test.py:142:15: UP032 [*] Use f-string instead of `format` call

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

- install_files/ansible-base/roles/restore/files/compare_torrc.py:56:9: UP032 Use f-string instead of `format` call
+ install_files/ansible-base/roles/restore/files/compare_torrc.py:56:9: UP032 [*] Use f-string instead of `format` call
- molecule/testinfra/app-code/test_securedrop_rqrequeue.py:20:13: UP032 Use f-string instead of `format` call
+ molecule/testinfra/app-code/test_securedrop_rqrequeue.py:20:13: UP032 [*] Use f-string instead of `format` call
- molecule/testinfra/app-code/test_securedrop_rqrequeue.py:24:13: UP032 Use f-string instead of `format` call
+ molecule/testinfra/app-code/test_securedrop_rqrequeue.py:24:13: UP032 [*] Use f-string instead of `format` call
- molecule/testinfra/app-code/test_securedrop_rqworker.py:22:13: UP032 Use f-string instead of `format` call
+ molecule/testinfra/app-code/test_securedrop_rqworker.py:22:13: UP032 [*] Use f-string instead of `format` call
- molecule/testinfra/app-code/test_securedrop_shredder_configuration.py:19:13: UP032 Use f-string instead of `format` call
+ molecule/testinfra/app-code/test_securedrop_shredder_configuration.py:19:13: UP032 [*] Use f-string instead of `format` call
... 42 additional changes omitted for project

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

- ibis/backends/bigquery/udf/core.py:390:16: UP032 Use f-string instead of `format` call
+ ibis/backends/bigquery/udf/core.py:390:16: UP032 [*] Use f-string instead of `format` call
- ibis/backends/bigquery/udf/core.py:440:16: UP032 Use f-string instead of `format` call
+ ibis/backends/bigquery/udf/core.py:440:16: UP032 [*] Use f-string instead of `format` call
- ibis/backends/dask/__init__.py:83:17: UP032 Use f-string instead of `format` call
+ ibis/backends/dask/__init__.py:83:17: UP032 [*] Use f-string instead of `format` call
- ibis/backends/impala/ddl.py:470:16: UP032 Use f-string instead of `format` call
+ ibis/backends/impala/ddl.py:470:16: UP032 [*] Use f-string instead of `format` call
- ibis/backends/pandas/__init__.py:320:17: UP032 Use f-string instead of `format` call
+ ibis/backends/pandas/__init__.py:320:17: UP032 [*] Use f-string instead of `format` call
... 4 additional changes omitted for project

milvus-io/pymilvus (+0 -0 violations, +6 -0 fixes)

- examples/example_bulkinsert_json.py:256:11: UP032 Use f-string instead of `format` call
+ examples/example_bulkinsert_json.py:256:11: UP032 [*] Use f-string instead of `format` call
- examples/example_bulkinsert_numpy.py:258:11: UP032 Use f-string instead of `format` call
+ examples/example_bulkinsert_numpy.py:258:11: UP032 [*] Use f-string instead of `format` call
- pymilvus/bulk_writer/buffer.py:112:21: UP032 Use f-string instead of `format` call
+ pymilvus/bulk_writer/buffer.py:112:21: UP032 [*] Use f-string instead of `format` call

mlflow/mlflow (+0 -0 violations, +74 -0 fixes)

- examples/multistep_workflow/main.py:43:17: UP032 Use f-string instead of `format` call
+ examples/multistep_workflow/main.py:43:17: UP032 [*] Use f-string instead of `format` call
- examples/pytorch/mnist_tensorboard_artifact.py:153:17: UP032 Use f-string instead of `format` call
+ examples/pytorch/mnist_tensorboard_artifact.py:153:17: UP032 [*] Use f-string instead of `format` call
- examples/pytorch/mnist_tensorboard_artifact.py:184:9: UP032 Use f-string instead of `format` call
+ examples/pytorch/mnist_tensorboard_artifact.py:184:9: UP032 [*] Use f-string instead of `format` call
- examples/pytorch/torchscript/MNIST/mnist_torchscript.py:50:17: UP032 Use f-string instead of `format` call
+ examples/pytorch/torchscript/MNIST/mnist_torchscript.py:50:17: UP032 [*] Use f-string instead of `format` call
- examples/pytorch/torchscript/MNIST/mnist_torchscript.py:77:9: UP032 Use f-string instead of `format` call
+ examples/pytorch/torchscript/MNIST/mnist_torchscript.py:77:9: UP032 [*] Use f-string instead of `format` call
... 64 additional changes omitted for project

pypa/pip (+0 -0 violations, +34 -0 fixes)

- src/pip/__pip-runner__.py:21:9: UP032 Use f-string instead of `format` call
+ src/pip/__pip-runner__.py:21:9: UP032 [*] Use f-string instead of `format` call
- src/pip/_internal/commands/search.py:78:23: UP032 Use f-string instead of `format` call
+ src/pip/_internal/commands/search.py:78:23: UP032 [*] Use f-string instead of `format` call
- src/pip/_internal/models/candidate.py:23:16: UP032 Use f-string instead of `format` call
+ src/pip/_internal/models/candidate.py:23:16: UP032 [*] Use f-string instead of `format` call
- src/pip/_internal/operations/install/wheel.py:507:27: UP032 Use f-string instead of `format` call
+ src/pip/_internal/operations/install/wheel.py:507:27: UP032 [*] Use f-string instead of `format` call
- src/pip/_internal/operations/install/wheel.py:517:27: UP032 Use f-string instead of `format` call
+ src/pip/_internal/operations/install/wheel.py:517:27: UP032 [*] Use f-string instead of `format` call
... 24 additional changes omitted for project

rotki/rotki (+0 -0 violations, +12 -0 fixes)

- rotkehlchen/chain/ethereum/abi.py:77:36: UP032 Use f-string instead of `format` call
+ rotkehlchen/chain/ethereum/abi.py:77:36: UP032 [*] Use f-string instead of `format` call
- rotkehlchen/exchanges/binance.py:398:25: UP032 Use f-string instead of `format` call
+ rotkehlchen/exchanges/binance.py:398:25: UP032 [*] Use f-string instead of `format` call
- rotkehlchen/exchanges/bitcoinde.py:236:17: UP032 Use f-string instead of `format` call
+ rotkehlchen/exchanges/bitcoinde.py:236:17: UP032 [*] Use f-string instead of `format` call
- rotkehlchen/exchanges/bitmex.py:207:17: UP032 Use f-string instead of `format` call
+ rotkehlchen/exchanges/bitmex.py:207:17: UP032 [*] Use f-string instead of `format` call
- rotkehlchen/exchanges/iconomi.py:187:17: UP032 Use f-string instead of `format` call
+ rotkehlchen/exchanges/iconomi.py:187:17: UP032 [*] Use f-string instead of `format` call
... 2 additional changes omitted for project

scikit-build/scikit-build (+0 -0 violations, +2 -0 fixes)

- tests/test_issue342_cmake_osx_args_in_setup.py:193:9: UP032 Use f-string instead of `format` call
+ tests/test_issue342_cmake_osx_args_in_setup.py:193:9: UP032 [*] Use f-string instead of `format` call

zulip/zulip (+0 -0 violations, +38 -0 fixes)

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

- corporate/lib/stripe.py:2205:28: UP032 Use f-string instead of `format` call
+ corporate/lib/stripe.py:2205:28: UP032 [*] Use f-string instead of `format` call
- corporate/lib/stripe.py:2207:28: UP032 Use f-string instead of `format` call
+ corporate/lib/stripe.py:2207:28: UP032 [*] Use f-string instead of `format` call
- scripts/lib/zulip_tools.py:565:15: UP032 Use f-string instead of `format` call
+ scripts/lib/zulip_tools.py:565:15: UP032 [*] Use f-string instead of `format` call
- tools/lib/provision.py:48:9: UP032 Use f-string instead of `format` call
+ tools/lib/provision.py:48:9: UP032 [*] Use f-string instead of `format` call
- zerver/actions/create_realm.py:322:19: UP032 Use f-string instead of `format` call
+ zerver/actions/create_realm.py:322:19: UP032 [*] Use f-string instead of `format` call
... 28 additional changes omitted for project

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

Changes by rule (1 rules affected)

code total + violation - violation + fix - fix
UP032 452 0 0 452 0

Linter (preview)

ℹ️ ecosystem check detected linter changes. (+0 -0 violations, +452 -0 fixes in 12 projects; 31 projects unchanged)

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

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

- tests/conftest.py:492:13: UP032 Use f-string instead of `format` call
+ tests/conftest.py:492:13: UP032 [*] Use f-string instead of `format` call

demisto/content (+0 -0 violations, +134 -0 fixes)

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

- Packs/Active_Directory_Query/Integrations/Active_Directory_Query/Active_Directory_Query.py:865:17: UP032 Use f-string instead of `format` call
+ Packs/Active_Directory_Query/Integrations/Active_Directory_Query/Active_Directory_Query.py:865:17: UP032 [*] Use f-string instead of `format` call
- Packs/ArcSightESM/Integrations/ArcSightESMv2/ArcSightESMv2.py:562:13: UP032 Use f-string instead of `format` call
+ Packs/ArcSightESM/Integrations/ArcSightESMv2/ArcSightESMv2.py:562:13: UP032 [*] Use f-string instead of `format` call
- Packs/ArcSightESM/Integrations/ArcSightESMv2/ArcSightESMv2.py:737:22: UP032 Use f-string instead of `format` call
+ Packs/ArcSightESM/Integrations/ArcSightESMv2/ArcSightESMv2.py:737:22: UP032 [*] Use f-string instead of `format` call
- Packs/ArcSightESM/Integrations/ArcSightESMv2/ArcSightESMv2.py:809:13: UP032 Use f-string instead of `format` call
+ Packs/ArcSightESM/Integrations/ArcSightESMv2/ArcSightESMv2.py:809:13: UP032 [*] Use f-string instead of `format` call
- Packs/ArcSightESM/Integrations/ArcSightESMv2/ArcSightESMv2.py:887:26: UP032 Use f-string instead of `format` call
+ Packs/ArcSightESM/Integrations/ArcSightESMv2/ArcSightESMv2.py:887:26: UP032 [*] Use f-string instead of `format` call
- Packs/AttivoBotsink/Integrations/AttivoBotsink/AttivoBotsink.py:752:25: UP032 Use f-string instead of `format` call
+ Packs/AttivoBotsink/Integrations/AttivoBotsink/AttivoBotsink.py:752:25: UP032 [*] Use f-string instead of `format` call
- Packs/Base/Scripts/DBotPreprocessTextData/DBotPreprocessTextData.py:429:26: UP032 Use f-string instead of `format` call
+ Packs/Base/Scripts/DBotPreprocessTextData/DBotPreprocessTextData.py:429:26: UP032 [*] Use f-string instead of `format` call
... 120 additional changes omitted for project

docker/docker-py (+0 -0 violations, +6 -0 fixes)

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

- tests/unit/api_exec_test.py:14:51: UP032 Use f-string instead of `format` call
+ tests/unit/api_exec_test.py:14:51: UP032 [*] Use f-string instead of `format` call
- tests/unit/errors_test.py:128:15: UP032 Use f-string instead of `format` call
+ tests/unit/errors_test.py:128:15: UP032 [*] Use f-string instead of `format` call
- tests/unit/errors_test.py:142:15: UP032 Use f-string instead of `format` call
+ tests/unit/errors_test.py:142:15: UP032 [*] Use f-string instead of `format` call

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

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

- install_files/ansible-base/roles/restore/files/compare_torrc.py:56:9: UP032 Use f-string instead of `format` call
+ install_files/ansible-base/roles/restore/files/compare_torrc.py:56:9: UP032 [*] Use f-string instead of `format` call
- molecule/testinfra/app-code/test_securedrop_rqrequeue.py:20:13: UP032 Use f-string instead of `format` call
+ molecule/testinfra/app-code/test_securedrop_rqrequeue.py:20:13: UP032 [*] Use f-string instead of `format` call
- molecule/testinfra/app-code/test_securedrop_rqrequeue.py:24:13: UP032 Use f-string instead of `format` call
+ molecule/testinfra/app-code/test_securedrop_rqrequeue.py:24:13: UP032 [*] Use f-string instead of `format` call
- molecule/testinfra/app-code/test_securedrop_rqworker.py:22:13: UP032 Use f-string instead of `format` call
+ molecule/testinfra/app-code/test_securedrop_rqworker.py:22:13: UP032 [*] Use f-string instead of `format` call
- molecule/testinfra/app-code/test_securedrop_shredder_configuration.py:19:13: UP032 Use f-string instead of `format` call
+ molecule/testinfra/app-code/test_securedrop_shredder_configuration.py:19:13: UP032 [*] Use f-string instead of `format` call
... 42 additional changes omitted for project

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

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

- ibis/backends/bigquery/udf/core.py:390:16: UP032 Use f-string instead of `format` call
+ ibis/backends/bigquery/udf/core.py:390:16: UP032 [*] Use f-string instead of `format` call
- ibis/backends/bigquery/udf/core.py:440:16: UP032 Use f-string instead of `format` call
+ ibis/backends/bigquery/udf/core.py:440:16: UP032 [*] Use f-string instead of `format` call
- ibis/backends/dask/__init__.py:83:17: UP032 Use f-string instead of `format` call
+ ibis/backends/dask/__init__.py:83:17: UP032 [*] Use f-string instead of `format` call
- ibis/backends/impala/ddl.py:470:16: UP032 Use f-string instead of `format` call
+ ibis/backends/impala/ddl.py:470:16: UP032 [*] Use f-string instead of `format` call
- ibis/backends/pandas/__init__.py:320:17: UP032 Use f-string instead of `format` call
+ ibis/backends/pandas/__init__.py:320:17: UP032 [*] Use f-string instead of `format` call
... 4 additional changes omitted for project

milvus-io/pymilvus (+0 -0 violations, +6 -0 fixes)

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

- examples/example_bulkinsert_json.py:256:11: UP032 Use f-string instead of `format` call
+ examples/example_bulkinsert_json.py:256:11: UP032 [*] Use f-string instead of `format` call
- examples/example_bulkinsert_numpy.py:258:11: UP032 Use f-string instead of `format` call
+ examples/example_bulkinsert_numpy.py:258:11: UP032 [*] Use f-string instead of `format` call
- pymilvus/bulk_writer/buffer.py:112:21: UP032 Use f-string instead of `format` call
+ pymilvus/bulk_writer/buffer.py:112:21: UP032 [*] Use f-string instead of `format` call

mlflow/mlflow (+0 -0 violations, +74 -0 fixes)

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

- examples/multistep_workflow/main.py:43:17: UP032 Use f-string instead of `format` call
+ examples/multistep_workflow/main.py:43:17: UP032 [*] Use f-string instead of `format` call
- examples/pytorch/mnist_tensorboard_artifact.py:153:17: UP032 Use f-string instead of `format` call
+ examples/pytorch/mnist_tensorboard_artifact.py:153:17: UP032 [*] Use f-string instead of `format` call
- examples/pytorch/mnist_tensorboard_artifact.py:184:9: UP032 Use f-string instead of `format` call
+ examples/pytorch/mnist_tensorboard_artifact.py:184:9: UP032 [*] Use f-string instead of `format` call
- examples/pytorch/torchscript/MNIST/mnist_torchscript.py:50:17: UP032 Use f-string instead of `format` call
+ examples/pytorch/torchscript/MNIST/mnist_torchscript.py:50:17: UP032 [*] Use f-string instead of `format` call
- examples/pytorch/torchscript/MNIST/mnist_torchscript.py:77:9: UP032 Use f-string instead of `format` call
+ examples/pytorch/torchscript/MNIST/mnist_torchscript.py:77:9: UP032 [*] Use f-string instead of `format` call
... 64 additional changes omitted for project

pypa/pip (+0 -0 violations, +34 -0 fixes)

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

- src/pip/__pip-runner__.py:21:9: UP032 Use f-string instead of `format` call
+ src/pip/__pip-runner__.py:21:9: UP032 [*] Use f-string instead of `format` call
- src/pip/_internal/commands/search.py:78:23: UP032 Use f-string instead of `format` call
+ src/pip/_internal/commands/search.py:78:23: UP032 [*] Use f-string instead of `format` call
- src/pip/_internal/models/candidate.py:23:16: UP032 Use f-string instead of `format` call
+ src/pip/_internal/models/candidate.py:23:16: UP032 [*] Use f-string instead of `format` call
- src/pip/_internal/operations/install/wheel.py:507:27: UP032 Use f-string instead of `format` call
+ src/pip/_internal/operations/install/wheel.py:507:27: UP032 [*] Use f-string instead of `format` call
- src/pip/_internal/operations/install/wheel.py:517:27: UP032 Use f-string instead of `format` call
+ src/pip/_internal/operations/install/wheel.py:517:27: UP032 [*] Use f-string instead of `format` call
... 24 additional changes omitted for project

rotki/rotki (+0 -0 violations, +12 -0 fixes)

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

- rotkehlchen/chain/ethereum/abi.py:77:36: UP032 Use f-string instead of `format` call
+ rotkehlchen/chain/ethereum/abi.py:77:36: UP032 [*] Use f-string instead of `format` call
- rotkehlchen/exchanges/binance.py:398:25: UP032 Use f-string instead of `format` call
+ rotkehlchen/exchanges/binance.py:398:25: UP032 [*] Use f-string instead of `format` call
- rotkehlchen/exchanges/bitcoinde.py:236:17: UP032 Use f-string instead of `format` call
+ rotkehlchen/exchanges/bitcoinde.py:236:17: UP032 [*] Use f-string instead of `format` call
- rotkehlchen/exchanges/bitmex.py:207:17: UP032 Use f-string instead of `format` call
+ rotkehlchen/exchanges/bitmex.py:207:17: UP032 [*] Use f-string instead of `format` call
- rotkehlchen/exchanges/iconomi.py:187:17: UP032 Use f-string instead of `format` call
+ rotkehlchen/exchanges/iconomi.py:187:17: UP032 [*] Use f-string instead of `format` call
... 2 additional changes omitted for project

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

Changes by rule (1 rules affected)

code total + violation - violation + fix - fix
UP032 452 0 0 452 0

Copy link
Member

@MichaReiser MichaReiser left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I understand the motivation for changing this and am sorry for the frustration that it has caused.

What I worry is that this now is a selective view. People agreeing with fixing code that increases the line length aren't represented. For example, this comment which seems a fair concern.

To me, it seems that we should decide and change this holistically rather than on a rule-by-rule basis, especially because we should avoid switching between the two paradigms.

I'm okay moving forward with this because I share the sentiment that we shouldn't gate our fixes based on line-length. But I worry that we leave a group of people underrepresented.

@charliermarsh
Copy link
Member Author

That's a fair position! But from that perspective, we likely shouldn't have changed this rule in the first place, right? Since we didn't establish a clear policy or poll users on both ends of the spectrum?

In my view, adding the diagnostic but not the fix just creates more work for users. It's more work to address the violation themselves than to fix-up the fix.

@charliermarsh charliermarsh merged commit 91af5a4 into main Mar 7, 2024
17 checks passed
@charliermarsh charliermarsh deleted the charlie/up branch March 7, 2024 13:59
@alex
Copy link
Contributor

alex commented Mar 7, 2024

Thank you!

nkxxll pushed a commit to nkxxll/ruff that referenced this pull request Mar 10, 2024
… (`UP032`) (astral-sh#10263)

## Summary

This is a follow-up to astral-sh#10238 to
offer fixes for the f-string rule regardless of the line length of the
resulting fix. To quote Alex in the linked PR:

> Yes, from the user's perspective I'd rather have a fix that may lead
to line length issues than have to fix them myself :-) Cleaning up line
lengths is easier than changing from `"".format()` to `f""`

I agree with this position, which is that if we're going to offer a
diagnostic, we should really be offering the user the ability to fix it
-- otherwise, we're just inconveniencing them.
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.

None yet

3 participants