flake8
-
reviewboard/notifications/email/__init__.py (Diff revision 1) Show all issues
Review Request #12591 — Created Sept. 12, 2022 and submitted
Information | |
---|---|
maubin | |
Review Board | |
release-5.0.x | |
|
|
Reviewers | |
reviewboard | |
Currently, users do not get notified about expired tokens. With this change, an
email is sent the first time an expired token is used. The email describes when
the token expired and how to create new tokens. If the email was successfully
sent, any subsequent uses of the token do not trigger another email.This change also fixes up all of the API token email templates by adding date
formatting and fixing some missing URLs. The tests for the templates were also
fixed up.
reviewboard/notifications/tests/test_email_sending.py
Summary |
---|
Description | From | Last Updated |
---|---|---|
'djblets.webapi.signals.webapi_token_deleted' imported but unused Column: 1 Error code: F401 |
![]() |
|
continuation line under-indented for visual indent Column: 25 Error code: E128 |
![]() |
|
continuation line under-indented for visual indent Column: 25 Error code: E128 |
![]() |
|
I think this is meant to say "deleted"? |
|
|
You can leave off the , None, since that's the default. |
|
|
This would be better as a boolean, I think. |
|
|
Can you add some additional checks to verify the display of the timestamps in the content? I noticed none of … |
|
|
line too long (80 > 79 characters) Column: 80 Error code: E501 |
![]() |
|
line too long (80 > 79 characters) Column: 80 Error code: E501 |
![]() |
|
line too long (80 > 79 characters) Column: 80 Error code: E501 |
![]() |
|
line too long (80 > 79 characters) Column: 80 Error code: E501 |
![]() |
Summary: |
|
|||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Description: |
|
|||||||||||||||
Testing Done: |
|
|||||||||||||||
Commits: |
|
|||||||||||||||
Depends On: |
|
|||||||||||||||
Diff: |
Revision 2 (+296 -32) |
Checks whether an expired notification has already been sent.
Commits: |
|
||||||
---|---|---|---|---|---|---|---|
Diff: |
Revision 3 (+298 -32) |
reviewboard/notifications/email/signal_handlers.py (Diff revision 3) |
---|
continuation line under-indented for visual indent Column: 25 Error code: E128
reviewboard/notifications/email/signal_handlers.py (Diff revision 3) |
---|
continuation line under-indented for visual indent Column: 25 Error code: E128
Fix under-indented lines.
Commits: |
|
||||||
---|---|---|---|---|---|---|---|
Diff: |
Revision 4 (+298 -32) |
reviewboard/notifications/email/signal_handlers.py (Diff revision 4) |
---|
I think this is meant to say "deleted"?
reviewboard/notifications/email/signal_handlers.py (Diff revision 4) |
---|
You can leave off the
, None
, since that's the default.
reviewboard/notifications/email/signal_handlers.py (Diff revision 4) |
---|
This would be better as a boolean, I think.
reviewboard/notifications/tests/test_email_sending.py (Diff revision 4) |
---|
Can you add some additional checks to verify the display of the timestamps in the content?
I noticed none of our API token e-mails force a timestamp format, but our other templates all do. Inconsistent, which.. fine, it's been that way a while, but for some future-proofing, it'll be good to make sure we have some testing around how it actually ends up rendering.
In fact, these templates are so small, let's compare the full strings (
assertHTMLEqual
for the HTML one).
expired_notification_sent
to a booleanDescription: |
|
||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Commits: |
|
||||||||||||||||||||||||
Diff: |
Revision 5 (+680 -142) |
reviewboard/notifications/tests/test_email_sending.py (Diff revision 5) |
---|
line too long (80 > 79 characters) Column: 80 Error code: E501
reviewboard/notifications/tests/test_email_sending.py (Diff revision 5) |
---|
line too long (80 > 79 characters) Column: 80 Error code: E501
reviewboard/notifications/tests/test_email_sending.py (Diff revision 5) |
---|
line too long (80 > 79 characters) Column: 80 Error code: E501
reviewboard/notifications/tests/test_email_sending.py (Diff revision 5) |
---|
line too long (80 > 79 characters) Column: 80 Error code: E501
Shortened some lines that were too long.
Commits: |
|
||||||
---|---|---|---|---|---|---|---|
Diff: |
Revision 6 (+688 -142) |