What's wrong with this code?
cmd = [
"rsync",
"-avz", # archive mode, verbose, compress
"-e",
"ssh",
"--exclude=.git" # equivalent to ignore-vcs
"--delete",
"/root/code/api/",
"user@remote:/app/"
# Preserve symlinks as-is (equivalent to --symlink-mode=posix-raw)
"--links",
]
subprocess.run(cmd)
It's missing two commas! However, if you're generally OK with multi-line implicit concatenation (which I am), there's currently no way to get a warning for this case. I therefore propose adding a new rule, ISC004, which will warn if implicitly-concatenated strings are separated by a comment - which can be fixed by either adding an explicit + or moving the comment.
See also flake8-implicit-str-concat/flake8-implicit-str-concat#55. I would not add an autofix for this lint rule, as the intended semantics are ambiguous.