flake8
-
reviewboard/reviews/ui/base.py (Diff revision 1) -
reviewboard/reviews/ui/markdownui.py (Diff revision 1) 'typing.TYPE_CHECKING' imported but unused Column: 1 Error code: F401
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 |
reviewboard/reviews/ui/base.py (Diff revision 1) |
---|
reviewboard/reviews/ui/markdownui.py (Diff revision 1) |
---|
'typing.TYPE_CHECKING' imported but unused Column: 1 Error code: F401
Commits: |
|
|||||||
---|---|---|---|---|---|---|---|---|
Diff: |
Revision 2 (+1046 -218) |
reviewboard/reviews/ui/base.py (Diff revision 2) |
---|
Could we use a
List
ofdjblets.util.typing.JSONDict
here since the return value must be serializable into JSON?
reviewboard/reviews/ui/base.py (Diff revision 2) |
---|
Same here and below for other serialize methods, can we use
djblets.util.typing.JSONDict
?
reviewboard/reviews/ui/text.py (Diff revision 2) |
---|
Doesn't this return
django.utils.safestring.SafeText
instead of a normal string?
Commits: |
|
|||||||
---|---|---|---|---|---|---|---|---|
Diff: |
Revision 3 (+1048 -218) |
Commits: |
|
|||||||
---|---|---|---|---|---|---|---|---|
Diff: |
Revision 4 (+1076 -218) |