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-18544: Add python-level deprecation warnings for Calib interface #448
Conversation
from .photoCalib import PhotoCalib | ||
|
||
|
||
@continueClass # noqa F811 |
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.
I think this should formally be noqa: F811
(the colon is important to flake8 since it tells it to only mask F811 rather than ignoring all warnings).
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.
It looks like we get this wrong all over in afw: I find 33 uses of noqa
(space) vs. 8 uses of noqa:
(colon space).
# return self._setCalib(*args, **kwargs) | ||
@deprecated(reason="Replaced with setPhotoCalib (will be removed after v18)", category=FutureWarning) | ||
def setCalib(self, *args, **kwargs): | ||
self._setCalib(*args, **kwargs) |
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.
Why force the wrapped methods to be all underscores instead of just following the style guide
setCalib = deprecated(reason="Replaced with setPhotoCalib (will be removed after v18)", category=FutureWarning)(setCalib)
You had to make a lot of changes in the C++ file...
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.
Because that doesn't work for methods on classes due to a docstring overwriting problem. @ktlim has what he thinks is a fix for upstream deprecate
, but getting that into the stack is a problem because of upgrading the conda env being complicated.
63617d8
to
d48ea17
Compare
d48ea17
to
59912d4
Compare
PhotoCalib deprecations handled in a continueClass, which can be removed entirely when we remove all of these deprecations.
Without the colon, they cause flake8 to ignore everything. We want to ignore specific lint, not lint in general.
59912d4
to
e1dcc7f
Compare
No description provided.