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-45209: Fix E721 error and general pyupgrade fixes #111

Merged
merged 8 commits into from
Jul 12, 2024
Merged

Conversation

timj
Copy link
Member

@timj timj commented Jul 11, 2024

Checklist

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

Copy link

codecov bot commented Jul 11, 2024

Codecov Report

Attention: Patch coverage is 48.07692% with 27 lines in your changes missing coverage. Please review.

Project coverage is 85.87%. Comparing base (fbcc870) to head (4de627f).

Files Patch % Lines
python/lsst/pex/config/configChoiceField.py 50.00% 3 Missing ⚠️
python/lsst/pex/config/configField.py 0.00% 3 Missing ⚠️
python/lsst/pex/config/dictField.py 62.50% 3 Missing ⚠️
python/lsst/pex/config/history.py 0.00% 3 Missing ⚠️
python/lsst/pex/config/comparison.py 0.00% 2 Missing ⚠️
python/lsst/pex/config/config.py 71.42% 2 Missing ⚠️
python/lsst/pex/config/configDictField.py 75.00% 2 Missing ⚠️
python/lsst/pex/config/configurableField.py 0.00% 2 Missing ⚠️
python/lsst/pex/config/registry.py 33.33% 2 Missing ⚠️
python/lsst/pex/config/wrap.py 0.00% 2 Missing ⚠️
... and 3 more
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #111      +/-   ##
==========================================
+ Coverage   85.74%   85.87%   +0.13%     
==========================================
  Files          46       46              
  Lines        3613     3604       -9     
==========================================
- Hits         3098     3095       -3     
+ Misses        515      509       -6     

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

@timj timj requested a review from ktlim July 11, 2024 21:21
@@ -1384,9 +1365,12 @@ def saveToStream(self, outfile, root="config", skipImports=False):
configType = type(self)
typeString = _typeStr(configType)
outfile.write(f"import {configType.__module__}\n")
# We are required to write this on a single line because
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As a general comment, I have seen people reformat config .py files to make them look neater and I now worry that those will no longer be readable.

python/lsst/pex/config/registry.py Outdated Show resolved Hide resolved
python/lsst/pex/config/choiceField.py Outdated Show resolved Hide resolved
timj added 6 commits July 12, 2024 10:26
This required a change to the regex that parses the class name
on read.

Also changed the code to use f-string.
ForwardRef needs to explicitly call out recursive_guard in python 3.12.
Should not rely on optional daf_base.
@timj timj force-pushed the tickets/DM-45209 branch from 9784eb5 to 4de627f Compare July 12, 2024 17:26
@timj timj merged commit 2cdde0e into main Jul 12, 2024
13 of 14 checks passed
@timj timj deleted the tickets/DM-45209 branch July 12, 2024 17:44
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