Skip to content
This repository has been archived by the owner on Jul 16, 2023. It is now read-only.

[New rule] Avoid triple quotes when not needed #802

Open
NickBalnaves opened this issue Apr 16, 2022 · 0 comments
Open

[New rule] Avoid triple quotes when not needed #802

NickBalnaves opened this issue Apr 16, 2022 · 0 comments
Assignees
Labels
area-rules type: enhancement New feature or request

Comments

@NickBalnaves
Copy link

NickBalnaves commented Apr 16, 2022

Please describe what the rule should do:
Prefer single quotes instead of triple quotes if the string only spans one line.

What category of rule is this? (place an "X" next to just one item)

[ ] Warns about a potential error (problem)
[x] Suggests an alternate way of doing something (suggestion)
[ ] Other (please specify:)

Provide 2-3 code examples that this rule will warn about (it will be better if you can provide both good and bad examples):

Good:

Text('My text'),
Text(
  'My '
  'text',
),

Bad:

Text('''My text'''),
Text(
  'My '
  '''text''',
),

Are you willing to submit a pull request to implement this rule?
No

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-rules type: enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants