Skip to content

Replace black with ruff for code formatting#119

Merged
norkans7 merged 1 commit intomainfrom
update-deps
Mar 24, 2026
Merged

Replace black with ruff for code formatting#119
norkans7 merged 1 commit intomainfrom
update-deps

Conversation

@norkans7
Copy link
Copy Markdown
Contributor

No description provided.

Copilot AI review requested due to automatic review settings March 24, 2026 10:47
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Mar 24, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.79%. Comparing base (b0375a8) to head (842a226).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #119   +/-   ##
=======================================
  Coverage   99.79%   99.79%           
=======================================
  Files           9        9           
  Lines        1443     1443           
=======================================
  Hits         1440     1440           
  Misses          3        3           

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Copy Markdown
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 updates the repository’s formatting setup to rely on Ruff formatting rather than Black, aligning configuration and CI naming with the intended formatter.

Changes:

  • Remove the [tool.black] configuration from pyproject.toml.
  • Update the CI workflow step name to reflect that formatting checks are performed via ruff format --check.

Reviewed changes

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

File Description
pyproject.toml Removes Black config; retains Ruff config that now effectively governs formatting.
.github/workflows/ci.yml Renames the formatting step to accurately describe the Ruff formatter check being run.

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

Comment on lines 42 to 43
[tool.ruff]
line-length = 120
Copy link

Copilot AI Mar 24, 2026

Choose a reason for hiding this comment

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

[tool.ruff] is configured with line-length = 120, but isort is still configured with line_length = 119 (see the [tool.isort] section further down in this file). Now that formatting is handled by Ruff, these mismatched line-length settings can lead to inconsistent wrapping behavior across tools; it’s best to align on a single value (e.g., set both to 120, or keep both at 119 to preserve existing formatting).

Copilot uses AI. Check for mistakes.

[tool.ruff]
line-length = 120
fix = true
Copy link

Copilot AI Mar 24, 2026

Choose a reason for hiding this comment

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

fix = true makes ruff check run in fix mode by default. Since CI runs ruff check temba_client without --no-fix, this can cause the linter step to mutate files in CI (and potentially mask issues depending on exit-code behavior). Consider setting fix = false in config and enabling fixes only in local/dev commands, or add --no-fix in CI (and optionally --exit-non-zero-on-fix where fixes are allowed).

Suggested change
fix = true
fix = false

Copilot uses AI. Check for mistakes.
@norkans7 norkans7 merged commit 55845fd into main Mar 24, 2026
8 checks passed
@norkans7 norkans7 deleted the update-deps branch March 24, 2026 10:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants