ClearCase updates part 1: basic cleanup
Review Request #13605 — Created March 4, 2024 and submitted
This change does some very basic cleanup to the ClearCase implementation
in RBTools:
- Replace %-format strings with f-strings where it makes sense.
- Change "unicode" to "str" in docstrings.
- Remove a few unused private methods.
- Fix up some line length issues.
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:
-
Summary ID b29ad9018c81ff017c558ba9b1a9cc7b00c9126d b01f291ff798eab0cd3781c84652cc00ccafb35c - Diff:
-
Revision 2 (+250 -434)
Checks run (2 succeeded)
-
-
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:
-
Summary ID b01f291ff798eab0cd3781c84652cc00ccafb35c 33848d04e105ad0bcaa8401cc1f848b02b7d47a4 - Diff:
-
Revision 3 (+248 -428)