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

Feature: find extra parentheses that can be removed #214

Open
sobolevn opened this issue Oct 5, 2018 · 3 comments
Open

Feature: find extra parentheses that can be removed #214

sobolevn opened this issue Oct 5, 2018 · 3 comments
Labels
dependencies Pull requests that update a dependency file feature New feature or request help wanted Extra attention is needed level:advanced Needs a lot of care

Comments

@sobolevn
Copy link
Member

sobolevn commented Oct 5, 2018

Rule request

Thesis

There are cases when parentheses can be removed. Like: x = ('string').
There are also examples when it can not be removed: x = (1 + 3) * 2

There are also cases when they should not be removed (since I prefer to use tuple with explicit parentheses): x = (1, 2).

Reasoning

This will increase consistency.

Format

This should be a separate plugin. Because I am sure that this will be impossible to achieve without logical_line param.
Related: https://rules.sonarsource.com/python/RSPEC-1110

@sobolevn sobolevn added feature New feature or request help wanted Extra attention is needed dependencies Pull requests that update a dependency file level:advanced Needs a lot of care labels Oct 5, 2018
@sobolevn sobolevn modified the milestone: Version 0.4.0 Oct 27, 2018
@sobolevn sobolevn added this to the Version 0.6.0 milestone Nov 10, 2018
@sobolevn sobolevn removed this from the Version 0.6.0 milestone Dec 1, 2018
@sobolevn
Copy link
Member Author

sobolevn commented Dec 5, 2019

Easy case: print((a))

@sobolevn
Copy link
Member Author

sobolevn commented Dec 5, 2019

Or return ((a, b, c))

@sobolevn sobolevn added this to the Version 0.15 milestone Mar 6, 2020
@sobolevn sobolevn modified the milestones: Version 0.16, Version 0.15 aka New runtime Oct 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file feature New feature or request help wanted Extra attention is needed level:advanced Needs a lot of care
Projects
None yet
Development

No branches or pull requests

1 participant