Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DM-48788: Use ruff format #116

Merged
merged 17 commits into from
Feb 10, 2025
Merged

DM-48788: Use ruff format #116

merged 17 commits into from
Feb 10, 2025

Conversation

timj
Copy link
Member

@timj timj commented Feb 8, 2025

Checklist

  • ran Jenkins
  • added a release note for user-visible changes to doc/changes

Copy link

codecov bot commented Feb 8, 2025

Codecov Report

Attention: Patch coverage is 65.45455% with 19 lines in your changes missing coverage. Please review.

Project coverage is 86.09%. Comparing base (384b627) to head (aa4eee9).
Report is 18 commits behind head on main.

✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
python/lsst/pex/config/config.py 25.00% 6 Missing ⚠️
python/lsst/pex/config/history.py 28.57% 5 Missing ⚠️
python/lsst/pex/config/configChoiceField.py 40.00% 3 Missing ⚠️
python/lsst/pex/config/wrap.py 33.33% 2 Missing ⚠️
...figurableActions/_configurableActionStructField.py 66.66% 1 Missing ⚠️
python/lsst/pex/config/configurableField.py 80.00% 1 Missing ⚠️
tests/testLib.py 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #116      +/-   ##
==========================================
+ Coverage   86.01%   86.09%   +0.07%     
==========================================
  Files          46       46              
  Lines        3648     3647       -1     
==========================================
+ Hits         3138     3140       +2     
+ Misses        510      507       -3     

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

@timj
Copy link
Member Author

timj commented Feb 8, 2025

@ktlim I had a go at fixing some Bugbear warnings. Would you mind taking a quick look at the three commits (raises, zip, unused variables)?

Bugbear is complaining about one more problem (used 5 times):

python/lsst/pex/config/listField.py:344:42: B004 [*] Using `hasattr(x, "__call__")` to test if x is callable is unreliable. Use `callable(x)` for consistent results.
    |
342 |         if listCheck is not None and not hasattr(listCheck, "__call__"):
343 |             raise ValueError("'listCheck' must be callable")
344 |         if itemCheck is not None and not hasattr(itemCheck, "__call__"):
    |                                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ B004
345 |             raise ValueError("'itemCheck' must be callable")
    |
    = help: Replace with `callable()`

which seems fine but I see that the docs for callable say that it's not quite equivalent.

@timj timj merged commit 7f23998 into main Feb 10, 2025
17 of 18 checks passed
@timj timj deleted the tickets/DM-48788 branch February 10, 2025 21:12
python/lsst/pex/config/config.py Show resolved Hide resolved
python/lsst/pex/config/listField.py Show resolved Hide resolved
python/lsst/pex/config/listField.py Show resolved Hide resolved
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