flake8
-
djblets/webapi/oauth2_scopes.py (Diff revision 1) -
djblets/webapi/resources/mixins/oauth2_tokens.py (Diff revision 1) E501 line too long (85 > 79 characters)
-
Review Request #9030 — Created June 22, 2017 and submitted
Djblets now supports OAuth2 authentication in the Web API. Documentation
has been added, in the form of a guide, showing how to enable OAuth2
token access in applications.This support is added via the
django_oauth_toolkit
package, which is a
development dependnecy but not a deployment dependency. The OAuth2
features will simply be non-functional if the dependency is not
installed.Some minor cleanup has been done in the
ResourceAPITokenMixin
to
help ensure methods from mixins don't override eachother. Additionally,
TheWebAPITestCaseMixin
was fixed so that additional arguments can be
passed to the underlying client request.Based on work by: Minh Le Hoang (https://reviews.reviewboard.org/r/7997/)
Description | From | Last Updated |
---|---|---|
You posted the wrong revision range. The latest diff here includes other changes. |
david | |
F841 local variable 'old__setattr__' is assigned to but never used |
reviewbot | |
E501 line too long (85 > 79 characters) |
reviewbot | |
W391 blank line at end of file |
reviewbot | |
E501 line too long (85 > 79 characters) |
reviewbot | |
Is there any reason to not include request in the kwargs in the function? |
david | |
Would be a little bit nicer as: if (valid and self.verify_request(request, r.access_token, r.user)): return r.user else: return None |
david | |
I'm on the edge of my seat. |
david | |
When importing just a single item, continuation is ok. |
david | |
E501 line too long (85 > 79 characters) |
reviewbot | |
E303 too many blank lines (3) |
reviewbot | |
F401 'oauth2_provider.models.AccessToken' imported but unused |
reviewbot | |
W293 blank line contains whitespace |
reviewbot | |
W293 blank line contains whitespace |
reviewbot | |
W293 blank line contains whitespace |
reviewbot | |
W293 blank line contains whitespace |
reviewbot | |
W293 blank line contains whitespace |
reviewbot | |
W291 trailing whitespace |
reviewbot | |
W291 trailing whitespace |
reviewbot | |
W291 trailing whitespace |
reviewbot | |
W293 blank line contains whitespace |
reviewbot | |
W291 trailing whitespace |
reviewbot | |
W293 blank line contains whitespace |
reviewbot | |
W293 blank line contains whitespace |
reviewbot | |
W293 blank line contains whitespace |
reviewbot | |
W293 blank line contains whitespace |
reviewbot | |
W293 blank line contains whitespace |
reviewbot | |
W293 blank line contains whitespace |
reviewbot | |
E703 statement ends with a semicolon |
reviewbot | |
W293 blank line contains whitespace |
reviewbot | |
W291 trailing whitespace |
reviewbot | |
W291 trailing whitespace |
reviewbot | |
W291 trailing whitespace |
reviewbot | |
W293 blank line contains whitespace |
reviewbot | |
W291 trailing whitespace |
reviewbot | |
W293 blank line contains whitespace |
reviewbot | |
W293 blank line contains whitespace |
reviewbot | |
W293 blank line contains whitespace |
reviewbot | |
W293 blank line contains whitespace |
reviewbot | |
W293 blank line contains whitespace |
reviewbot | |
W293 blank line contains whitespace |
reviewbot | |
E703 statement ends with a semicolon |
reviewbot | |
W293 blank line contains whitespace |
reviewbot | |
W291 trailing whitespace |
reviewbot | |
W291 trailing whitespace |
reviewbot | |
W291 trailing whitespace |
reviewbot | |
W293 blank line contains whitespace |
reviewbot | |
W291 trailing whitespace |
reviewbot | |
W293 blank line contains whitespace |
reviewbot | |
W293 blank line contains whitespace |
reviewbot | |
E703 statement ends with a semicolon |
reviewbot | |
W291 trailing whitespace |
reviewbot | |
W293 blank line contains whitespace |
reviewbot | |
W293 blank line contains whitespace |
reviewbot | |
Isn't this part of another change? |
david | |
F401 'djblets.webapi.errors.PERMISSION_DENIED' imported but unused |
reviewbot | |
F401 'djblets.webapi.errors.OAUTH_EXPIRED_ERROR' imported but unused |
reviewbot | |
F401 'djblets.webapi.errors.NOT_LOGGED_IN' imported but unused |
reviewbot | |
Too many blank lines. |
david | |
E501 line too long (94 > 79 characters) |
reviewbot |
djblets/webapi/oauth2_scopes.py (Diff revision 1) |
---|
djblets/webapi/resources/mixins/oauth2_tokens.py (Diff revision 1) |
---|
E501 line too long (85 > 79 characters)
djblets/webapi/resources/mixins/oauth2_tokens.py (Diff revision 2) |
---|
E501 line too long (85 > 79 characters)
Diff: |
Revision 3 (+1238 -23) |
---|
djblets/webapi/resources/mixins/oauth2_tokens.py (Diff revision 3) |
---|
E501 line too long (85 > 79 characters)
Description: |
|
---|
This is looking pretty good to me. Christian should probably give his sign-off too.
djblets/webapi/oauth2_scopes.py (Diff revision 3) |
---|
When importing just a single item, continuation is ok.
Diff: |
Revision 4 (+1303 -23) |
---|---|
Added Files: |
djblets/webapi/auth/backends/oauth2_tokens.py (Diff revision 4) |
---|
F401 'oauth2_provider.models.AccessToken' imported but unused
djblets/webapi/auth/backends/oauth2_tokens.py (Diff revisions 3 - 5) |
---|
Is there any reason to not include
request
in the kwargs in the function?
djblets/webapi/auth/backends/oauth2_tokens.py (Diff revisions 3 - 5) |
---|
Would be a little bit nicer as:
if (valid and self.verify_request(request, r.access_token, r.user)): return r.user else: return None
Diff: |
Revision 6 (+1493 -26) |
---|
djblets/webapi/resources/mixins/oauth2_tokens.py (Diff revision 6) |
---|
W293 blank line contains whitespace
djblets/webapi/resources/mixins/oauth2_tokens.py (Diff revision 7) |
---|
E703 statement ends with a semicolon
djblets/webapi/resources/mixins/oauth2_tokens.py (Diff revision 7) |
---|
W293 blank line contains whitespace
Diff: |
Revision 8 (+1493 -26) |
---|
djblets/webapi/resources/mixins/oauth2_tokens.py (Diff revision 8) |
---|
E703 statement ends with a semicolon
djblets/webapi/resources/mixins/oauth2_tokens.py (Diff revision 8) |
---|
W293 blank line contains whitespace
djblets/webapi/resources/mixins/oauth2_tokens.py (Diff revision 9) |
---|
E703 statement ends with a semicolon
Don't cause stack overflow in RB unit tests
Commit: |
|
||
---|---|---|---|
Diff: |
Revision 11 (+1516 -36) |
djblets/webapi/tests/test_oauth2_auth.py (Diff revision 14) |
---|
F401 'djblets.webapi.errors.PERMISSION_DENIED' imported but unused
djblets/webapi/tests/test_oauth2_auth.py (Diff revision 14) |
---|
F401 'djblets.webapi.errors.OAUTH_EXPIRED_ERROR' imported but unused
Commit: |
|
||||
---|---|---|---|---|---|
Diff: |
Revision 15 (+2596 -912) |
djblets/webapi/resources/mixins/oauth2_tokens.py (Diff revision 16) |
---|
F401 'djblets.webapi.errors.NOT_LOGGED_IN' imported but unused
djblets/webapi/resources/mixins/oauth2_tokens.py (Diff revision 18) |
---|
E501 line too long (94 > 79 characters)