-
-
Notifications
You must be signed in to change notification settings - Fork 87
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Summary
I have a pre-commit hook which is a wrapper around ruff.
It basically calls:
cmd = ['ruff', 'check', '--fix', '--extend-ignore', 'ERA,RUF005,UP008,UP031,UP032,E501,UP009,PGH004,FURB156,CPY001,F821', '--stdin-filename', 'blah', '--', '/tmp/tmp4avodvqg']
process = subprocess.Popen(cmd, stdin=None, stderr=subprocess.STDOUT)
process.communicate()
The ruff subprocess now waits for stdin, which will never get any.
sys.stdin.isatty() returns True with prek, and False with pre-commit.
I can workaround it by passing stdin=open('/dev/null') to the subprocess.
Platform
Linux 6.5.0-0.deb12.1-amd64 x86_64 GNU/Linux
Version
0.2.17
.pre-commit-config.yaml
No response
Log file
No response
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working