-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #76 from vintasoftware/feat/setup-ruff
Set up `ruff`
- Loading branch information
Showing
27 changed files
with
351 additions
and
366 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
exclude = [ | ||
"env", | ||
"venv", | ||
".pyenv", | ||
".pytest_cache", | ||
"*/__pycache__/*", | ||
"*/migrations/*", | ||
"docs", | ||
] | ||
|
||
line-length = 100 | ||
|
||
target-version = "py38" | ||
|
||
[format] | ||
quote-style = "double" | ||
indent-style = "space" | ||
line-ending = "auto" | ||
|
||
[lint] | ||
extend-select = ["I"] | ||
|
||
[lint.isort.sections] | ||
django = ["django"] | ||
drf = ["rest_framework"] | ||
|
||
[lint.isort] | ||
section-order = [ | ||
"future", | ||
"standard-library", | ||
"django", | ||
"drf", | ||
"third-party", | ||
"first-party", | ||
"local-folder", | ||
] |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,25 @@ | ||
# -*- coding: utf-8 -*- | ||
|
||
from rest_framework import viewsets, mixins | ||
from rest_framework import mixins, viewsets | ||
|
||
from .generics import GenericAPIView | ||
from .mixins import CreateModelMixin, UpdateModelMixin, ListModelMixin, RetrieveModelMixin | ||
from .mixins import CreateModelMixin, ListModelMixin, RetrieveModelMixin, UpdateModelMixin | ||
|
||
|
||
class GenericViewSet(GenericAPIView, | ||
viewsets.GenericViewSet): | ||
class GenericViewSet(GenericAPIView, viewsets.GenericViewSet): | ||
pass | ||
|
||
|
||
class ModelViewSet(CreateModelMixin, | ||
RetrieveModelMixin, | ||
UpdateModelMixin, | ||
mixins.DestroyModelMixin, | ||
ListModelMixin, | ||
GenericViewSet): | ||
class ModelViewSet( | ||
CreateModelMixin, | ||
RetrieveModelMixin, | ||
UpdateModelMixin, | ||
mixins.DestroyModelMixin, | ||
ListModelMixin, | ||
GenericViewSet, | ||
): | ||
pass | ||
|
||
|
||
class ReadOnlyModelViewSet(RetrieveModelMixin, | ||
ListModelMixin, | ||
GenericViewSet): | ||
class ReadOnlyModelViewSet(RetrieveModelMixin, ListModelMixin, GenericViewSet): | ||
pass |
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 |
---|---|---|
@@ -1 +1 @@ | ||
default_app_config = 'example_app.apps.ExampleAppConfig' # pylint: disable=invalid-name | ||
default_app_config = "example_app.apps.ExampleAppConfig" # pylint: disable=invalid-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
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
Oops, something went wrong.