Skip to content

Find ruff more effectively for linting/formatting step#124

Merged
fritz-astronomer merged 5 commits intomainfrom
ruff
Jan 13, 2026
Merged

Find ruff more effectively for linting/formatting step#124
fritz-astronomer merged 5 commits intomainfrom
ruff

Conversation

@fritz-astronomer
Copy link
Contributor

@fritz-astronomer fritz-astronomer commented Jan 13, 2026

utilizes https://github.com/astral-sh/ruff/blob/main/python/ruff/__main__.py#L8
Falls back to shutil.which('ruff')


  • fix(formatter): find ruff more effectively
  • fix(cli): improve formatting logging
  • fix(cli): better logging for formatting and translation complete

@fritz-astronomer fritz-astronomer self-assigned this Jan 13, 2026
@fritz-astronomer fritz-astronomer added the bug Something isn't working label Jan 13, 2026
@codecov-commenter
Copy link

codecov-commenter commented Jan 13, 2026

Codecov Report

❌ Patch coverage is 4.16667% with 23 lines in your changes missing coverage. Please review.
✅ Project coverage is 82.27%. Comparing base (b3ee237) to head (f23edc0).
⚠️ Report is 79 commits behind head on main.

Files with missing lines Patch % Lines
orbiter/__main__.py 0.00% 23 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #124      +/-   ##
==========================================
+ Coverage   78.92%   82.27%   +3.35%     
==========================================
  Files          35       51      +16     
  Lines        1362     2009     +647     
==========================================
+ Hits         1075     1653     +578     
- Misses        287      356      +69     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR improves the reliability of finding the ruff executable for linting and formatting operations by utilizing ruff's own find_ruff_bin function when available, with a fallback to shutil.which('ruff').

Changes:

  • Updated run() function signature to accept both string and list commands
  • Added logic to locate ruff executable using ruff's internal find_ruff_bin function with fallback
  • Updated ruff command invocations to use the dynamically found ruff path
  • Bumped version to 1.10.3

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
orbiter/main.py Added ruff executable discovery logic and updated command calls to use found path
orbiter/init.py Version bump to reflect the fix

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@fritz-astronomer fritz-astronomer merged commit 05056fa into main Jan 13, 2026
8 checks passed
@fritz-astronomer fritz-astronomer deleted the ruff branch January 13, 2026 18:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants