flake8
-
rbtools/clients/clearcase.py (Diff revision 1) -
-
-
Review Request #13605 — Created March 4, 2024 and submitted
This change does some very basic cleanup to the ClearCase implementation
in RBTools:
Ran unit tests.
Summary | ID |
---|---|
33848d04e105ad0bcaa8401cc1f848b02b7d47a4 |
Description | From | Last Updated |
---|---|---|
undefined name 'cast' Column: 16 Error code: F821 |
reviewbot | |
undefined name 'cast' Column: 30 Error code: F821 |
reviewbot | |
undefined name 'cast' Column: 30 Error code: F821 |
reviewbot | |
undefined name 'cast' Column: 19 Error code: F821 |
reviewbot | |
I think the old logic was more correct. _get_host_info() can return None as a valid result, and when it returns … |
chipx86 |
Commits: |
|
|||||||
---|---|---|---|---|---|---|---|---|
Diff: |
Revision 2 (+250 -434) |
rbtools/clients/clearcase.py (Diff revision 2) |
---|
I think the old logic was more correct.
_get_host_info()
can returnNone
as a valid result, and when it returnsNone
, that result should be reused. It checks dependencies, calls things, and then logs state. We don't want to do this on each access of the property.If we had Djblets's
UNSET
value, then I'd say switch to that, but we don't. So the flag we had is the more correct option.FWIW, this was also pretty recently introduced as part of the dependency work. This was a workaround for the lack of
@cached_property
(note: Python 3.8+ has a@cached_property
, but its design is bad and slow and was redone for Python 3.12, so it's not something we should use yet).
Commits: |
|
|||||||
---|---|---|---|---|---|---|---|---|
Diff: |
Revision 3 (+248 -428) |