Skip to content

Commit e1baaac

Browse files
committed
fix
1 parent 72c8f84 commit e1baaac

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

bindings/python/stub.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,8 +150,7 @@ def py_file(module, origin):
150150

151151
def do_ruff(code, is_pyi: bool):
152152
command = ["ruff", "format", "--config", "pyproject.toml"]
153-
if is_pyi:
154-
command.extend(["--stdin-filename", "test.pyi"])
153+
command.extend(["--stdin-filename", "test.pyi" if is_pyi else "test.py", "-"])
155154
process = subprocess.Popen(command, stdout=subprocess.PIPE, stderr=subprocess.PIPE, stdin=subprocess.PIPE)
156155
stdout, stderr = process.communicate(input=code.encode("utf-8"))
157156
if stderr:

0 commit comments

Comments
 (0)