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

Add rule to suggest f-string over string concatenation #8790

Closed
ThiefMaster opened this issue Nov 20, 2023 · 1 comment
Closed

Add rule to suggest f-string over string concatenation #8790

ThiefMaster opened this issue Nov 20, 2023 · 1 comment

Comments

@ThiefMaster
Copy link
Contributor

prefix = 'https://example.com'
print(prefix + '/test')

even with --select ALL --preview i only get unrelated results:

$ ruff --isolated --select ALL --preview --no-cache rufftest/ruff_sample.py
warning: `one-blank-line-before-class` (D203) and `no-blank-line-before-class` (D211) are incompatible. Ignoring `one-blank-line-before-class`.
warning: `multi-line-summary-first-line` (D212) and `multi-line-summary-second-line` (D213) are incompatible. Ignoring `multi-line-summary-second-line`.
rufftest/ruff_sample.py:1:1: INP001 File `rufftest/ruff_sample.py` is part of an implicit namespace package. Add an `__init__.py`.
rufftest/ruff_sample.py:1:1: D100 Missing docstring in public module
rufftest/ruff_sample.py:1:1: CPY001 Missing copyright notice at top of file
rufftest/ruff_sample.py:1:10: Q000 [*] Single quotes found but double quotes preferred
rufftest/ruff_sample.py:2:1: T201 `print` found
rufftest/ruff_sample.py:2:16: Q000 [*] Single quotes found but double quotes preferred
Found 6 errors.
[*] 2 fixable with the `--fix` option.
@charliermarsh
Copy link
Member

I believe this is the same as FLY001 proposed in #2102.

@charliermarsh charliermarsh closed this as not planned Won't fix, can't repro, duplicate, stale Nov 20, 2023
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

No branches or pull requests

2 participants