diff options
author | 2020-03-04 19:27:04 -0800 | |
---|---|---|
committer | 2020-03-04 19:47:49 -0800 | |
commit | 5ed6e71fed014759ef07399ecb25eb7538b1d5ae (patch) | |
tree | c73fc0fd5b3f9218263601ba2a499404cf975e6d /pydis_site/apps/api/views.py | |
parent | Update dev dependencies (diff) |
Add more pre-commit hooks
Hooks added:
* check-merge-conflict - checks for files with merge conflict strings
* check-toml - attempts to load all toml files to verify syntax
* check-yaml - attempts to load all yaml files to verify syntax
* end-of-file-fixer - ensures files end in a newline and only a newline
* mixed-line-ending - replaces mixed line endings with LF
* trailing-whitespace - trims trailing whitespace
* python-check-blanket-noqa - enforces that noqa annotations always
occur with specific codes
Changes made to comply with new hooks:
* Remove trailing whitespaces
* Remove some useless noqa annotations
* Specify errors for noqa annotations
* Add missing newlines at end of files
See: python-discord/organisation#138
Diffstat (limited to 'pydis_site/apps/api/views.py')
-rw-r--r-- | pydis_site/apps/api/views.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/pydis_site/apps/api/views.py b/pydis_site/apps/api/views.py index fd5a6d4d..a73d4718 100644 --- a/pydis_site/apps/api/views.py +++ b/pydis_site/apps/api/views.py @@ -24,7 +24,7 @@ class HealthcheckView(APIView): authentication_classes = () permission_classes = () - def get(self, request, format=None): # noqa + def get(self, request, format=None): # noqa: D102,ANN001,ANN201 return Response({'status': 'ok'}) @@ -96,7 +96,7 @@ class RulesView(APIView): ) # `format` here is the result format, we have a link format here instead. - def get(self, request, format=None): # noqa + def get(self, request, format=None): # noqa: D102,ANN001,ANN201 link_format = request.query_params.get('link_format', 'md') if link_format not in ('html', 'md'): raise ParseError( |