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

PR100: False positive inspection on list comprehension #354

Open
mykolasolodukha opened this issue Jun 28, 2022 · 0 comments
Open

PR100: False positive inspection on list comprehension #354

mykolasolodukha opened this issue Jun 28, 2022 · 0 comments
Labels
bug Something isn't working

Comments

@mykolasolodukha
Copy link

Describe the bug
While trying to shlex_quote inside a list comprehension, it still shows an inspection.

To Reproduce
Code or Steps to reproduce the behavior:

  1. Try to write:
    import subprocess
    from shlex import quote as shlex_quote
    
    files_to_add = input("Enter the files to be added to the commit:\n").split(" ")
    
    subprocess.run(
        ["git", "add", *[shlex_quote(file) for file in files_to_add]],
        check=True,
        shell=True,
    )
  2. See that it still complains about PR100 inspection.

Expected behavior
No PR100 inspection showed when the input is being shlex_quoted inside a list comprehension.

Screenshots
image

Additional context

  • Plugin Version: 1.25.0
  • PyCharm Version (or IDE version): PyCharm 2022.1.3 (Professional Edition) Build #PY-221.5921.27, built on June 22, 2022
  • Python Version: Python 3.10.4
@mykolasolodukha mykolasolodukha added the bug Something isn't working label Jun 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant