Fix Makefile Ruff targets to use configured Python#1062
Fix Makefile Ruff targets to use configured Python#1062VaibhavUpreti merged 1 commit intoTracer-Cloud:mainfrom
Conversation
Greptile SummaryThis PR fixes two related bugs in the Confidence Score: 5/5Safe to merge — both changes are correct bug fixes with no functional regressions. The Python detection fix correctly addresses a real silent bug (empty-output condition that never matched), and the No files require special attention. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[make lint / format-check / format] --> B{.venv/bin/python exists?}
B -- Yes --> C[PYTHON = .venv/bin/python]
B -- No --> D{OS == Windows_NT?}
D -- Yes --> E{.venv/Scripts/python.exe exists?}
E -- Yes --> F[PYTHON = .venv\\Scripts\\python.exe]
E -- No --> G[PYTHON = python]
D -- No --> H{"command -v python3\n(NEW: was: python3 -c 'import sys')"}
H -- Found --> I[PYTHON = python3]
H -- Not found --> J[PYTHON = python]
C & F & G & I & J --> K["$(PYTHON) -m ruff check / format app/ tests/\n(NEW: was: bare ruff)"]
Reviews (1): Last reviewed commit: "fix(dev): run ruff through configured Py..." | Re-trigger Greptile |
VaibhavUpreti
left a comment
There was a problem hiding this comment.
awesome @Genmin , thanks a lot for fixing this!
|
💜 One more reason the project grows. Thanks @Genmin — your contribution just landed! 👋 Join us on Discord - OpenSRE : hang out, contribute, or hunt for features and issues. Everyone's welcome. |

Summary
Why
Part of #176. The Makefile computes a project Python interpreter, but lint/format targets were invoking bare ruff. That can fail after a standard venv install when Ruff is available as a module but not as a shell command.
Tests