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

Open
wants to merge 15 commits into
base: main
Choose a base branch
from
Open

DM-48788: Use ruff format #116

wants to merge 15 commits into from

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 62.00000% with 19 lines in your changes missing coverage. Please review.

Project coverage is 86.09%. Comparing base (384b627) to head (96daf3d).

✅ 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 75.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.

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