flake8
-
reviewboard/accounts/decorators.py (Diff revision 1) Show all issues
Review Request #9960 — Created May 17, 2018 and submitted
If an administrator has specified URLs to their privacy policy and/or
terms of service, and marked that they want users to consent to the use
of their data, they ought to get the user's acceptance of these
policies.This involves several small, related parts:
valid_prefs_required
decorator to not only ensure thatDescription | From | Last Updated |
---|---|---|
E127 continuation line over-indented for visual indent |
reviewbot | |
Can we reference the consent ID in question here from the class, instead of hard-coding? |
chipx86 | |
This can be one line. |
chipx86 | |
The reset is going to break extensions. We need to specifically unregister the ones we manage here. |
chipx86 | |
E501 line too long (82 > 79 characters) |
reviewbot | |
E501 line too long (80 > 79 characters) |
reviewbot | |
Swap these. |
chipx86 | |
This can be simplified as: for requirement in (GravatarConsentRequirement, PolicyConsentRequirement): try: registry.unregister_by_attr(...) except ItemLookupError: pass That'll help a lot for … |
chipx86 |
Commit: |
|
||||
---|---|---|---|---|---|
Diff: |
Revision 2 (+52 -10) |
reviewboard/accounts/decorators.py (Diff revision 2) |
---|
Can we reference the consent ID in question here from the class, instead of hard-coding?
reviewboard/accounts/privacy.py (Diff revision 2) |
---|
The reset is going to break extensions. We need to specifically unregister the ones we manage here.
Commit: |
|
||||
---|---|---|---|---|---|
Diff: |
Revision 3 (+66 -10) |
Commit: |
|
||||
---|---|---|---|---|---|
Diff: |
Revision 4 (+68 -10) |
reviewboard/accounts/privacy.py (Diff revision 4) |
---|
This can be simplified as:
for requirement in (GravatarConsentRequirement, PolicyConsentRequirement): try: registry.unregister_by_attr(...) except ItemLookupError: pass
That'll help a lot for future expansion too.
Commit: |
|
||||
---|---|---|---|---|---|
Diff: |
Revision 5 (+62 -10) |