flake8
-
reviewboard/attachments/tests.py (Diff revision 1) Show all issues -
-
Review Request #11394 — Created Jan. 22, 2021 and discarded
Information | |
---|---|
ryankang | |
Review Board | |
release-4.0.x | |
4900 | |
Reviewers | |
reviewboard, students | |
Previously logging in
reviewboard/reviewboard/attachments
was
un-named logging. This means it's hard to determine where the
error came from in the logs.To fix this a global
logger
variable was defined in each file
that adds the location of the file to the error message.
Added unit test for
unregister_mimetype_handler
that passes it an
unregistered handler. This should cause an error to be logged. The
unit test listens to whether or not the logger ran.Ran
./tests/runtests.py reviewboard.attachments
and passed all 32 tests.
Summary |
---|
Description | From | Last Updated |
---|---|---|
Please wrap your description and testing done to 80 columns. That last sentence in testing done also needs a period … |
|
|
Please add the bug number in the "bugs" field. |
|
|
Please capitalize the sentence in your summary. You can also refer to "reviewboard.attachments" instead of giving the file path. |
|
|
The diff as posted has a lot of extra stuff. It looks like you pulled on release-4.0.x but then didn't … |
|
|
E302 expected 2 blank lines, found 1 |
![]() |
|
E302 expected 2 blank lines, found 1 |
![]() |
|
E501 line too long (111 > 79 characters) |
![]() |
|
You'll need to update the indentation of the line with the arguments to match (since "logger" is one fewer character … |
|
|
Let's wrap this as such: """Testing if logger in unregister_mimetype_handler is called when an unregistered handler is passed in """ … |
|
|
Let's add another two blank lines above this. |
|
|
This should have two blank lines above and below it. |
|
reviewboard/attachments/tests.py (Diff revision 1) |
---|
Description: |
|
||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Testing Done: |
|
||||||||||||
Commits: |
|
||||||||||||
Diff: |
Revision 2 (+67 -23) |
Description: |
|
|||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Testing Done: |
|
Please wrap your description and testing done to 80 columns. That last sentence in testing done also needs a period at the end.
Please capitalize the sentence in your summary. You can also refer to "reviewboard.attachments" instead of giving the file path.
reviewboard/attachments/mimetypes.py (Diff revision 2) |
---|
You'll need to update the indentation of the line with the arguments to match (since "logger" is one fewer character than "logging"). Here and all the other places you changed.
reviewboard/attachments/tests.py (Diff revision 2) |
---|
Let's wrap this as such:
"""Testing if logger in unregister_mimetype_handler is called when an unregistered handler is passed in """
Note also that I changed the spaces to underscores in that message to match the method name.
Summary: |
|
||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Description: |
|
||||||||||||||||||||||||
Testing Done: |
|
||||||||||||||||||||||||
Commits: |
|
||||||||||||||||||||||||
Bugs: |
|
||||||||||||||||||||||||
Diff: |
Revision 3 (+94 -52) |
reviewboard/attachments/mimetypes.py (Diff revision 3) |
---|
Let's add another two blank lines above this.
reviewboard/attachments/models.py (Diff revision 3) |
---|
This should have two blank lines above and below it.
added 2 blank spaces before and after all definitions of logger
Commits: |
|
||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Diff: |
Revision 4 (+1702 -4519) |