Skip to content

Fix the Ruff errors reported in #200 - #203

Open
hao0x1 wants to merge 2 commits into
SethMMorton:mainfrom
hao0x1:codex/fix-ruff-checks
Open

hao0x1 wants to merge 2 commits into
SethMMorton:mainfrom
hao0x1:codex/fix-ruff-checks

Conversation

@hao0x1

@hao0x1 hao0x1 commented Oct 1, 2026

Copy link
Copy Markdown

Fixes #200.

This adds CPY001 to the ignore list as requested and puts None last in the two type unions flagged by RUF036.

Ruff 0.16.9 also flags two functions for having too many positional arguments (PLR0917). Both already have a PLR0913 exception for their argument counts, so this extends those same exceptions without changing the function signatures.

This follows the approach in the closed PR #202, with the checks rerun against current main.

On macOS with Python 3.10.20, Ruff goes from 38 errors to zero. All 355 tests pass both before and after the change. Formatting, doctests, strict mypy checks, and package build/validation also pass.

Codex helped with the changes and testing.

@codecov

codecov Bot commented Oct 16, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.80%. Comparing base (607eeee) to head (632416c).
⚠️ Report is 3 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #203   +/-   ##
=======================================
  Coverage   97.80%   97.80%           
=======================================
  Files          10       10           
  Lines         637      637           
=======================================
  Hits          623      623           
  Misses         14       14           

☔ View full report in Codecov by Harness.
📢 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.

@SethMMorton

Copy link
Copy Markdown
Owner

There is still a failure with ICN001 (see https://github.com/SethMMorton/natsort/actions/runs/36879900937/job/116774583287?pr=203). Feel free to update bump.py to fix or to simply ignore the error.

@SethMMorton

Copy link
Copy Markdown
Owner

A lot of tests are now failing because 3.9 has been removed from CI. If you are interested, can you update the CI configuration to remove 3.9, and for the things that were using 3.9 use 3.10 now?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fix ruff static analysis errors.

2 participants