pyupio/safety

return code is 0 even though nothing was checked

Closed this issue · 0 comments

The return code 0 should mean that that the given packages have been successfully checked.

p = subprocess.run(["safety", "check", "--output", "bare", "--stdin"], input="django", capture_output=True, text=True)
print(p.returncode)
0
print(p.stderr)
Warning: unpinned requirement 'django' found in None, unable to check.

I know that i can set input="django==5.0" to make it work but that is not the point.

Also, if there is a way to use safety without subprocess from python it would be perfect.