'subprocess.run' used without explicitly defining the value for 'check'.
109 os.tempnam("dir1")
110 subprocess.Popen("/bin/chown *", shell=True)
111 o.system("/bin/tar xvzf *")
112 subprocess.run(["clear"])113
114
115def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz):
Description
subprocess.run
uses a default of check=False
, which means that a nonzero exit code will be
ignored by default, instead of raising an exception.
You can ignore this issue if this behaviour is intended.
Bad practice
# Nonzero exit code will be ignored here
subprocess.run(['notify-send', '-u', 'critical', msg])
Recommended
# Exception will be raised for nonzero exit code
subprocess.run(['notify-send', '-u', 'critical', msg], check=True) # some comment