Skip to content

Fix Ruff lint violations - #57

Merged
timkpaine merged 3 commits into
mainfrom
fix-ruff-lint
Jul 28, 2026
Merged

Fix Ruff lint violations#57
timkpaine merged 3 commits into
mainfrom
fix-ruff-lint

Conversation

@timkpaine

Copy link
Copy Markdown
Member

Description

Update Python sources and tests for current Ruff checks without changing lint configuration. Modernize annotations, simplify flagged constructs, remove duplicate parameter cases, and preserve compatibility-sensitive exception behavior with targeted inline suppressions.

Type of Change

  • Bug fix
  • New feature
  • Documentation update
  • Refactor / code cleanup
  • CI / build configuration
  • Other (describe below)

Checklist

  • Linting passes (make lint)
  • Tests pass (make test)
  • New tests added for new functionality
  • Documentation updated (if applicable)
  • Changelog / version bump (if applicable)

Focused verification passed 1,296 tests. One additional config-loader test and completion tests fail locally because unrelated installed entry-point plugins add 33 unexpected config groups; this is environment contamination rather than a change introduced here.

Signed-off-by: Tim Paine <3105306+timkpaine@users.noreply.github.com>
Signed-off-by: Tim Paine <3105306+timkpaine@users.noreply.github.com>
@github-actions

github-actions Bot commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Test Results

3 185 tests   - 70   2 973 ✅  - 64   5m 54s ⏱️ - 1m 9s
    2 suites ± 0     212 💤  -  6 
    2 files   ± 0       0 ❌ ± 0 

Results for commit 866418b. ± Comparison against base commit 30ed1d1.

This pull request removes 113 and adds 43 tests. Note that renamed tests count towards both.
lerna.tests.defaults_list.test_defaults_tree ‑ test_missing_config_errors[missing_included_config0]
lerna.tests.defaults_list.test_defaults_tree ‑ test_missing_config_errors[missing_included_config1]
lerna.tests.test_completion ‑ test_strip[-0-python foo.py0- /foo/bar/]
lerna.tests.test_completion ‑ test_strip[-0-python foo.py0- ]
lerna.tests.test_completion ‑ test_strip[-0-python foo.py0-/foo/bar]
lerna.tests.test_completion ‑ test_strip[-0-python foo.py0-\t]
lerna.tests.test_completion ‑ test_strip[-0-python foo.py0-]
lerna.tests.test_completion ‑ test_strip[-0-python foo.py1- /foo/bar/]
lerna.tests.test_completion ‑ test_strip[-0-python foo.py1- ]
lerna.tests.test_completion ‑ test_strip[-0-python foo.py1-/foo/bar]
…
lerna.tests.defaults_list.test_defaults_tree ‑ test_missing_config_errors[missing_included_config]
lerna.tests.test_completion ‑ test_strip[-0-python foo.py- /foo/bar/]
lerna.tests.test_completion ‑ test_strip[-0-python foo.py- ]
lerna.tests.test_completion ‑ test_strip[-0-python foo.py-/foo/bar]
lerna.tests.test_completion ‑ test_strip[-0-python foo.py-\t]
lerna.tests.test_completion ‑ test_strip[-0-python foo.py-]
lerna.tests.test_completion ‑ test_strip[-None-python foo.py- /foo/bar/]
lerna.tests.test_completion ‑ test_strip[-None-python foo.py- ]
lerna.tests.test_completion ‑ test_strip[-None-python foo.py-/foo/bar]
lerna.tests.test_completion ‑ test_strip[-None-python foo.py-\t]
…

♻️ This comment has been updated with latest results.

@codecov

codecov Bot commented Jul 28, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 57.97101% with 319 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
lerna/core/default_element.py 16.66% 40 Missing ⚠️
lerna/core/override_parser/types.py 10.81% 33 Missing ⚠️
lerna/_internal/defaults_list.py 29.62% 19 Missing ⚠️
lerna/conf/__init__.py 5.88% 16 Missing ⚠️
lerna/_internal/hydra.py 0.00% 15 Missing ⚠️
lerna/core/utils.py 26.31% 13 Missing and 1 partial ⚠️
lerna/core/plugins.py 59.37% 11 Missing and 2 partials ⚠️
lerna/_internal/instantiate/_instantiate2.py 40.00% 8 Missing and 4 partials ⚠️
lerna/_internal/config_loader_impl.py 38.88% 10 Missing and 1 partial ⚠️
lerna/_internal/config_repository.py 65.62% 11 Missing ⚠️
... and 39 more
Files with missing lines Coverage Δ
lerna/__init__.py 0.00% <ø> (ø)
lerna/_internal/core_plugins/bash_completion.py 48.38% <100.00%> (-1.62%) ⬇️
lerna/_internal/core_plugins/basic_launcher.py 100.00% <100.00%> (ø)
lerna/_internal/core_plugins/basic_sweeper.py 91.89% <100.00%> (ø)
lerna/_internal/core_plugins/file_config_source.py 79.03% <100.00%> (-0.34%) ⬇️
lerna/_internal/core_plugins/fish_completion.py 39.53% <100.00%> (-1.38%) ⬇️
.../core_plugins/importlib_resources_config_source.py 85.26% <100.00%> (ø)
lerna/_internal/core_plugins/zsh_completion.py 50.00% <100.00%> (-1.62%) ⬇️
lerna/compose.py 60.86% <100.00%> (+4.86%) ⬆️
lerna/experimental/__init__.py 100.00% <ø> (ø)
... and 83 more

... and 1 file with indirect coverage changes

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

Signed-off-by: Tim Paine <3105306+timkpaine@users.noreply.github.com>
@timkpaine
timkpaine merged commit 0c8eb85 into main Jul 28, 2026
4 of 5 checks passed
@timkpaine
timkpaine deleted the fix-ruff-lint branch July 28, 2026 15:53
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.

1 participant