chore: fix formatting in fix_env.py#781
Conversation
|
✨ Submitted to Merge by @abhimehro. It will be added to the merge queue once all branch protection rules pass and there are no merge conflicts with the target branch. See more details here. |
PR SummaryLow Risk Overview No behavior changes are introduced; the Reviewed by Cursor Bugbot for commit 0d42acd. Configure here. |
There was a problem hiding this comment.
Pull request overview
This PR applies automated ruff format styling to fix_env.py to improve readability without changing behavior.
Changes:
- Reformatted the
tempfile.NamedTemporaryFile(...)call to a multi-line, trailing-comma style consistent withruff format.
Co-authored-by: abhimehro <84992105+abhimehro@users.noreply.github.com>
There was a problem hiding this comment.
Gates Passed
6 Quality Gates Passed
See analysis details in CodeScene
Quality Gate Profile: Pay Down Tech Debt
Install CodeScene MCP: safeguard and uplift AI-generated code. Catch issues early with our IDE extension and CLI tool.
| suffix=".tmp", | ||
| dir=".", | ||
| encoding="utf-8", | ||
| newline="\n", |
There was a problem hiding this comment.
📝 Info: newline="\n" ensures cross-platform .env consistency
The added newline="\n" parameter at fix_env.py:108 prevents Python's text-mode newline translation on Windows (where \n would otherwise become \r\n). Since the new_content string at fix_env.py:91 already uses literal \n, this change ensures the written file always has Unix line endings regardless of platform. This is a correct and appropriate fix for .env files, which are conventionally Unix-line-ended.
Was this helpful? React with 👍 or 👎 to provide feedback.
Severity: Low
Vulnerability: None - Routine maintenance
Impact: Improved code readability
Fix: Applied
ruff formattofix_env.pyVerification: Ran test suite and
ruff check