Skip to content

subprocess-without-shell-equals-true (S603) false-positives on tuples #17798

@Avasam

Description

@Avasam

Summary

#17136 closed #17112 by adding an exception to string literals and arrays of string literals. But it didn't include tuples:

Image

In this screenshot, you can see at line 309 that S603 was removed because Ruff deemed it unused, but at line 315 I had to keep it.

MRE:

import subprocess
subprocess.check_output(("literal", "cmd", "using", "tuple"), text=True)
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ S607

Version

ruff 0.11.8

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedContributions especially welcomeruleImplementing or modifying a lint rule

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions