MCPcopy Create free account
hub / github.com/YesianRohn/TextSSR / run_ruff

Function run_ruff

diffusers/utils/check_copies.py:96–100  ·  view source on GitHub ↗
(code)

Source from the content-addressed store, hash-verified

94
95
96def run_ruff(code):
97 command = ["ruff", "format", "-", "--config", "pyproject.toml", "--silent"]
98 process = subprocess.Popen(command, stdout=subprocess.PIPE, stderr=subprocess.PIPE, stdin=subprocess.PIPE)
99 stdout, _ = process.communicate(input=code.encode())
100 return stdout.decode()
101
102
103def stylify(code: str) -> str:

Callers 1

stylifyFunction · 0.85

Calls 2

encodeMethod · 0.45
decodeMethod · 0.45

Tested by

no test coverage detected