We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
my_list = [(1, 2), (3, 4)] new_list = [(low, end, None) for low, end in my_list]
Please notice that the issue is not reproduced with the following example:
my_list = [(1, 2), (3, 4)] my_var = None new_list = [(low, end, my_var) for low, end in my_list]
************* Module example example.py:2: [R1721(unnecessary-comprehension), ] Unnecessary use of a comprehension
-------------------------------------------------------------------- Your code has been rated at 10.00/10 (previous run: 10.00/10, +0.00)
pylint 2.4.2 astroid 2.3.1 Python 3.7.4 (default, Jul 16 2019, 07:12:58) [GCC 9.1.0]
The text was updated successfully, but these errors were encountered:
[(x, y, 1) for x, y in iterable]
Adding the above snippet to tests/functional/u/unnecessary_comprehension.py reproduces the issue
tests/functional/u/unnecessary_comprehension.py
Sorry, something went wrong.
05d3e15
properly handle literals in unnecessary-comprehension checker, cl…
unnecessary-comprehension
0094ab6
…oses #3148
No branches or pull requests
Steps to reproduce
Please notice that the issue is not reproduced with the following example:
Current behavior
Expected behavior
pylint --version output
The text was updated successfully, but these errors were encountered: