-
Notifications
You must be signed in to change notification settings - Fork 14
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-39696: Minor cleanup of test warnings #853
Conversation
They were removed from the other registry implementations long ago.
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## main #853 +/- ##
==========================================
+ Coverage 87.98% 88.01% +0.03%
==========================================
Files 269 269
Lines 35435 35417 -18
Branches 7429 7423 -6
==========================================
- Hits 31178 31173 -5
+ Misses 3114 3103 -11
+ Partials 1143 1141 -2
☔ View full report in Codecov by Sentry. |
On python 3.11 the previous code gave a warning: tests/test_cliUtils.py::MWOptionDecoratorTest::test_option .../python3.11/unittest/case.py:678: DeprecationWarning: It is deprecated to return a value that is not None from a test case (<lsst.daf.butler.cli.utils.MWOptionDecorator object at 0x2ae76e790>) return self.run(*args, **kwds)
The new v1.4.0 mypy error is: python/lsst/daf/butler/_butler.py:1657: error: Unsupported operand types for | ("Literal[DatasetExistence.RECORDED]" and "Literal[DatasetExistence._ASSUMED]") [operator]
python/lsst/daf/butler/_butler.py:1657: error: Unsupported operand types for | ("Literal[DatasetExistence.DATASTORE]" and "Literal[DatasetExistence._ASSUMED]") [operator]
python/lsst/daf/butler/_butler.py:1657: error: Unsupported operand types for | ("Literal[DatasetExistence._ARTIFACT]" and "Literal[DatasetExistence._ASSUMED]") [operator]
python/lsst/daf/butler/_butler.py:1657: error: Unsupported operand types for | ("Literal[DatasetExistence.KNOWN]" and "Literal[DatasetExistence._ASSUMED]") [operator]
python/lsst/daf/butler/_butler.py:1657: error: Unsupported operand types for | ("Literal[DatasetExistence.VERIFIED]" and "Literal[DatasetExistence._ASSUMED]") [operator]
python/lsst/daf/butler/_butler.py:1657: note: Left operand is of type "Literal[DatasetExistence.RECORDED, DatasetExistence.DATASTORE, DatasetExistence._ARTIFACT, DatasetExistence._ASSUMED, DatasetExistence.KNOWN, DatasetExistence.VERIFIED]" and I'm guessing that mypy is not clever to understand that different flags can be or-ed together. @andy-slac should I add an ignore annotation or does something jump out at you? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good.
Now always assume that we have one DatasetId type.
Checklist
doc/changes