Skip to content

Commit 799af89

Browse files
committed
style fixes
1 parent a148dbf commit 799af89

4 files changed

Lines changed: 13 additions & 15 deletions

File tree

InvenTree/InvenTree/api_tester.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,10 @@
66
import io
77
import re
88

9-
from django.http.response import StreamingHttpResponse
109
from django.contrib.auth import get_user_model
1110
from django.contrib.auth.models import Group
11+
from django.http.response import StreamingHttpResponse
12+
1213
from rest_framework.test import APITestCase
1314

1415

@@ -60,7 +61,7 @@ def setUp(self):
6061
if self.auto_login:
6162
self.client.login(username=self.username, password=self.password)
6263

63-
def assignRole(self, role = None, assign_all: bool = False):
64+
def assignRole(self, role=None, assign_all: bool = False):
6465
"""
6566
Set the user roles for the registered user
6667
"""

InvenTree/InvenTree/test_api.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,15 @@
11
""" Low level tests for the InvenTree API """
22

3-
from rest_framework import status
3+
from base64 import b64encode
44

55
from django.urls import reverse
6-
from InvenTree.helpers import InvenTreeTestCase
76

8-
from InvenTree.api_tester import InvenTreeAPITestCase
7+
from rest_framework import status
98

9+
from InvenTree.api_tester import InvenTreeAPITestCase
10+
from InvenTree.helpers import InvenTreeTestCase
1011
from users.models import RuleSet
1112

12-
from base64 import b64encode
13-
1413

1514
class HTMLAPITests(InvenTreeTestCase):
1615
"""

InvenTree/plugin/base/integration/test_mixins.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
""" Unit tests for base mixins for plugins """
22

3-
from django.test import TestCase
43
from django.conf import settings
5-
from django.urls import include, re_path, reverse
64
from django.contrib.auth import get_user_model
5+
from django.test import TestCase
6+
from django.urls import include, re_path, reverse
77

88
from error_report.models import Error
99

1010
from plugin import InvenTreePlugin
11-
from plugin.mixins import AppMixin, SettingsMixin, UrlsMixin, NavigationMixin, APICallMixin
12-
from plugin.urls import PLUGIN_BASE
1311
from plugin.helpers import MixinNotImplementedError
14-
12+
from plugin.mixins import (APICallMixin, AppMixin, NavigationMixin,
13+
SettingsMixin, UrlsMixin)
1514
from plugin.registry import registry
15+
from plugin.urls import PLUGIN_BASE
1616

1717

1818
class BaseMixinDefinition:

setup.cfg

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ ignore =
33
# - W605 - invalid escape sequence
44
W605,
55
# - E501 - line too long (82 characters)
6-
E501,
6+
E501,
77
# - E722 - do not use bare except
88
E722,
99
# - C901 - function is too complex
@@ -28,6 +28,4 @@ source = ./InvenTree
2828
src_paths=InvenTree
2929
skip_glob =*/migrations/*.py
3030
known_django=django
31-
import_heading_firstparty=InvenTree imports
32-
import_heading_thirdparty=Third-Party imports
3331
sections=FUTURE, STDLIB, DJANGO, THIRDPARTY, FIRSTPARTY, LOCALFOLDER

0 commit comments

Comments
 (0)