Add type hints to ReviewUI implementation.
Review Request #13514 — Created Jan. 31, 2024 and submitted
This change adds type hints to the Python side of the Review UI
implementation.While I was in here, I also discovered that the screenshot Review UI was
calling into Screenshot.display_id, which didn't exist. This code path
is effectively dead because the vast majority of installs don't use the
Screenshot model at all, but it could theoretically cause crashes on
very old review requests that do.
Ran unit tests.
Summary | ID |
---|---|
c4cb2a5e89693f440bf793ecc22289c29a9a302e |
Description | From | Last Updated |
---|---|---|
do not compare types, for exact checks use `is` / `is not`, for instance checks use `isinstance()` Column: 16 Error … |
reviewbot | |
'typing.TYPE_CHECKING' imported but unused Column: 1 Error code: F401 |
reviewbot | |
Could we use a List of djblets.util.typing.JSONDict here since the return value must be serializable into JSON? |
maubin | |
Same here and below for other serialize methods, can we use djblets.util.typing.JSONDict? |
maubin | |
Doesn't this return django.utils.safestring.SafeText instead of a normal string? |
maubin | |
Can use JSONDict here. |
maubin | |
Can use JSONDict here. Also missing docs. |
maubin | |
Can use JSONDict here. |
maubin | |
Can use JSONDict here. |
maubin | |
Can use JSONDict here. |
maubin |
- Commits:
-
Summary ID 314f71f36cf9688abd833a912c646c48dcaff0d9 481d2061277e92f9e0d944770c9910968ec322f2
Checks run (2 succeeded)
- Commits:
-
Summary ID 481d2061277e92f9e0d944770c9910968ec322f2 893ab915813937555fc2c60e0bd411879767476d