Skip to content

Commit c392793

Browse files
n2ygksliverc
authored andcommitted
tox flake8-isort exclude env and .venv (#645)
Updates setup.cfg to ignore the .venv/ or env/ directories as was already the case in .gitconfig. This allows having a local virtualenv that tox -e flake8 doesn't scan.
1 parent 8bb123c commit c392793

File tree

5 files changed

+9
-3
lines changed

5 files changed

+9
-3
lines changed

example/serializers.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
from datetime import datetime
22

3-
from rest_framework import serializers as drf_serilazers, fields as drf_fields
3+
from rest_framework import fields as drf_fields
4+
from rest_framework import serializers as drf_serilazers
45

56
from rest_framework_json_api import relations, serializers
67

example/tests/test_views.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010

1111
from rest_framework_json_api.utils import format_resource_type
1212

13-
from . import TestBase
1413
from .. import views
14+
from . import TestBase
1515
from example.factories import AuthorFactory, CommentFactory, EntryFactory
1616
from example.models import Author, Blog, Comment, Entry
1717
from example.serializers import AuthorBioSerializer, AuthorTypeSerializer, EntrySerializer

example/views.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
from rest_framework_json_api.filters import OrderingFilter, QueryParameterValidationFilter
1313
from rest_framework_json_api.pagination import JsonApiPageNumberPagination
1414
from rest_framework_json_api.utils import format_drf_errors
15-
from rest_framework_json_api.views import ModelViewSet, RelationshipView, PreloadIncludesMixin
15+
from rest_framework_json_api.views import ModelViewSet, PreloadIncludesMixin, RelationshipView
1616

1717
from example.models import Author, Blog, Comment, Company, Entry, Project, ProjectType
1818
from example.serializers import (

rest_framework_json_api/django_filters/backends.py

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
from django_filters.rest_framework import DjangoFilterBackend
55
from rest_framework.exceptions import ValidationError
66
from rest_framework.settings import api_settings
7+
78
from rest_framework_json_api.utils import format_value
89

910

setup.cfg

+4
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ exclude =
1313
migrations,
1414
.eggs
1515
.tox,
16+
env
17+
.venv
1618

1719
[isort]
1820
indent = 4
@@ -28,6 +30,8 @@ skip=
2830
migrations,
2931
.eggs
3032
.tox,
33+
env
34+
.venv
3135

3236
[coverage:run]
3337
source =

0 commit comments

Comments
 (0)