-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
105 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
{ | ||
"module.docstring": { | ||
"prefix": [ | ||
"module.docstring", | ||
"\"\"\"", | ||
"'''" | ||
], | ||
"scope": "python", | ||
"body": [ | ||
"\"\"\"", | ||
"© Ocado Group", | ||
"Created on $CURRENT_DATE/$CURRENT_MONTH/$CURRENT_YEAR at $CURRENT_HOUR:$CURRENT_MINUTE:$CURRENT_SECOND($CURRENT_TIMEZONE_OFFSET)." | ||
"", | ||
"${1:__description__}", | ||
"\"\"\"" | ||
] | ||
}, | ||
"module.doccomment": { | ||
"prefix": [ | ||
"module.doccomment", | ||
"/" | ||
], | ||
"scope": "javascript,typescript,javascriptreact,typescriptreact", | ||
"body": [ | ||
"/**", | ||
" * © Ocado Group", | ||
" * Created on $CURRENT_DATE/$CURRENT_MONTH/$CURRENT_YEAR at $CURRENT_HOUR:$CURRENT_MINUTE:$CURRENT_SECOND($CURRENT_TIMEZONE_OFFSET)." | ||
" *", | ||
" * ${1:__description__}", | ||
" */" | ||
] | ||
}, | ||
"pylint.disable-next": { | ||
"prefix": [ | ||
"# pylint" | ||
], | ||
"scope": "python", | ||
"body": [ | ||
"# pylint: disable-next=${1:__code_name__}" | ||
] | ||
}, | ||
"mypy.ignore": { | ||
"prefix": [ | ||
"# type" | ||
], | ||
"scope": "python", | ||
"body": [ | ||
"# type: ignore[${1:__code_name__}]" | ||
] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
""" | ||
© Ocado Group | ||
Created on 23/01/2024 at 14:46:23(+00:00). | ||
""" | ||
|
||
from rest_framework.permissions import BasePermission | ||
|
||
|
||
class AllowNone(BasePermission): | ||
""" | ||
Blocks all incoming requests. | ||
This is the opposite of DRF's AllowAny permission: | ||
https://www.django-rest-framework.org/api-guide/permissions/#allowany | ||
""" | ||
|
||
def has_permission(self, request, view): | ||
return False |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters