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-14204: Modernize python in ip_* packages #54
Conversation
642ac73
to
3bd61d2
Compare
a6db196
to
7df2c48
Compare
If future is no longer used please remove |
Eliminate use of future and __future__
2e4d09a
to
59ce0e7
Compare
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.
Please address the one issue, everything else looks ok
tests/test_crosstalk.py
Outdated
def runDataRef(_self, dataRef): | ||
return Struct(exposure=self.exposure) | ||
def runDataRef(self, dataRef, exposure=self.exposure): | ||
return Struct(exposure=exposure) |
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 get here that self needs fixed. However, why did you move exposure to the arguments list? Even if this is needed in the arguments, I don't see how this syntax is correct (baring some odd variable scoping). The self variable is not bound until entering the function body, before that it is just part of the parameter pack. Therefore exposure=self.exposure should not even be able to be parsed by python. If it can be then the "self" in exposure=self.exposure must be part of some clouser or outer class level scope, and is not necessarily the "self" that is the first argument to the function. If exposure is not needed in the call signature the function behavior should go back to what it was. If it is needed the function should be something like:
def runDataRef(self, dataRef, exposure=None):
if exposure is None:
exposure = self.exposure
return Struct(exposure=exposure)
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.
The self
in exposure=self.exposure
is the self
of the outer test class. This simply binds exposure, which otherwise is inaccessible because self
that is the first argument of runDataRef
hides it. It works, but I agree it's confusing to read. I'll try to figure out something less confusing.
I don't think we can fix the E266 violations from `##` Doxygen blocks without breaking the Doxygen
54589ad
to
82d6eed
Compare
No description provided.