Skip to content

Enforce more ruff rules#1065

Merged
scaramallion merged 24 commits into
pydicom:mainfrom
DimitriPapadopoulos:ruff
Mar 7, 2026
Merged

Enforce more ruff rules#1065
scaramallion merged 24 commits into
pydicom:mainfrom
DimitriPapadopoulos:ruff

Conversation

@DimitriPapadopoulos
Copy link
Copy Markdown
Contributor

Tasks

  • Unit tests added that reproduce issue or prove feature is working
  • Fix or feature added
  • Documentation and examples updated (if relevant)
  • Unit tests passing and coverage at 100% after adding fix/feature
  • Type annotations updated and passing with mypy
  • Apps updated and tested (if relevant)

Unnecessary list comprehension (rewrite as a set comprehension)
Unnecessary `tuple()` call (rewrite as a literal)
Unnecessary `list()` call within `sorted()`
Unnecessary list comprehension (rewrite using `list()`)
Unnecessary list comprehension
Implicitly concatenated string literals on one line
Prefer `object` to `Any` for the second parameter to `__eq__`
Prefer `object` to `Any` for the second parameter to `__ne__`
Return the condition directly
Use `key in dict` instead of `key in dict.keys()`
Extracting value from dictionary without calling `.items()`
Use `type` instead of `Type` for type annotation
Use f-string instead of `format` call
Avoid extraneous parentheses
Import from `collections.abc` instead
Use `X | None` for type annotations
Use `s.extend(...)` instead of repeatedly calling `s.append()`

Manual changes applied instead.
@codecov
Copy link
Copy Markdown

codecov Bot commented Feb 26, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.87%. Comparing base (4615d4d) to head (f245658).
⚠️ Report is 4 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1065      +/-   ##
==========================================
- Coverage   99.87%   99.87%   -0.01%     
==========================================
  Files          28       28              
  Lines        9012     8984      -28     
==========================================
- Hits         9001     8973      -28     
  Misses         11       11              
Files with missing lines Coverage Δ
pynetdicom/_config.py 100.00% <100.00%> (ø)
pynetdicom/_handlers.py 100.00% <100.00%> (ø)
pynetdicom/_validators.py 100.00% <100.00%> (ø)
pynetdicom/acse.py 100.00% <100.00%> (ø)
pynetdicom/ae.py 100.00% <100.00%> (ø)
pynetdicom/association.py 100.00% <100.00%> (ø)
pynetdicom/dimse_messages.py 100.00% <100.00%> (ø)
pynetdicom/dsutils.py 100.00% <100.00%> (ø)
pynetdicom/dul.py 100.00% <100.00%> (ø)
pynetdicom/events.py 100.00% <100.00%> (ø)
... and 10 more

... and 5 files with indirect coverage changes

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

@scaramallion scaramallion merged commit 21e4689 into pydicom:main Mar 7, 2026
9 of 11 checks passed
@scaramallion
Copy link
Copy Markdown
Member

Thanks!

@DimitriPapadopoulos DimitriPapadopoulos deleted the ruff branch March 7, 2026 06:28
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.

2 participants