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

generator causing false positive using-constant-test #10080

Open
jwilk opened this issue Nov 12, 2024 · 0 comments
Open

generator causing false positive using-constant-test #10080

jwilk opened this issue Nov 12, 2024 · 0 comments
Labels
False Positive 🦟 A message is emitted but nothing is wrong with the code Needs PR This issue is accepted, sufficiently specified and now needs an implementation

Comments

@jwilk
Copy link
Contributor

jwilk commented Nov 12, 2024

Bug description

def f():
    yield input()

[x] = f()
if x:
    pass

Command used

pylint --disable C const.py 

Pylint output

const.py:5:3: W0125: Using a conditional statement with a constant value (using-constant-test)

Expected behavior

no warnings reported

Pylint version

pylint 3.3.1
astroid 3.3.5
Python 3.13.0 (main, Oct  8 2024, 08:51:27) [GCC 9.4.0]
jwilk added a commit to jwilk/tjmer that referenced this issue Nov 12, 2024
Fixes:

    tjmer:89: W: using-constant-test [fmt_time] Using a conditional statement with a constant value
    tjmer:91: W: using-constant-test [fmt_time] Using a conditional statement with a constant value
    tjmer:93: W: using-constant-test [fmt_time] Using a conditional statement with a constant value

pylint-dev/pylint#10080
@Pierre-Sassoulas Pierre-Sassoulas added False Positive 🦟 A message is emitted but nothing is wrong with the code Needs PR This issue is accepted, sufficiently specified and now needs an implementation labels Nov 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
False Positive 🦟 A message is emitted but nothing is wrong with the code Needs PR This issue is accepted, sufficiently specified and now needs an implementation
Projects
None yet
Development

No branches or pull requests

2 participants