mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
style fixes
This commit is contained in:
parent
a148dbf303
commit
799af89312
@ -6,9 +6,10 @@ import csv
|
||||
import io
|
||||
import re
|
||||
|
||||
from django.http.response import StreamingHttpResponse
|
||||
from django.contrib.auth import get_user_model
|
||||
from django.contrib.auth.models import Group
|
||||
from django.http.response import StreamingHttpResponse
|
||||
|
||||
from rest_framework.test import APITestCase
|
||||
|
||||
|
||||
@ -60,7 +61,7 @@ class UserMixin:
|
||||
if self.auto_login:
|
||||
self.client.login(username=self.username, password=self.password)
|
||||
|
||||
def assignRole(self, role = None, assign_all: bool = False):
|
||||
def assignRole(self, role=None, assign_all: bool = False):
|
||||
"""
|
||||
Set the user roles for the registered user
|
||||
"""
|
||||
|
@ -1,16 +1,15 @@
|
||||
""" Low level tests for the InvenTree API """
|
||||
|
||||
from base64 import b64encode
|
||||
|
||||
from django.urls import reverse
|
||||
|
||||
from rest_framework import status
|
||||
|
||||
from django.urls import reverse
|
||||
from InvenTree.helpers import InvenTreeTestCase
|
||||
|
||||
from InvenTree.api_tester import InvenTreeAPITestCase
|
||||
|
||||
from InvenTree.helpers import InvenTreeTestCase
|
||||
from users.models import RuleSet
|
||||
|
||||
from base64 import b64encode
|
||||
|
||||
|
||||
class HTMLAPITests(InvenTreeTestCase):
|
||||
"""
|
||||
|
@ -1,18 +1,18 @@
|
||||
""" Unit tests for base mixins for plugins """
|
||||
|
||||
from django.test import TestCase
|
||||
from django.conf import settings
|
||||
from django.urls import include, re_path, reverse
|
||||
from django.contrib.auth import get_user_model
|
||||
from django.test import TestCase
|
||||
from django.urls import include, re_path, reverse
|
||||
|
||||
from error_report.models import Error
|
||||
|
||||
from plugin import InvenTreePlugin
|
||||
from plugin.mixins import AppMixin, SettingsMixin, UrlsMixin, NavigationMixin, APICallMixin
|
||||
from plugin.urls import PLUGIN_BASE
|
||||
from plugin.helpers import MixinNotImplementedError
|
||||
|
||||
from plugin.mixins import (APICallMixin, AppMixin, NavigationMixin,
|
||||
SettingsMixin, UrlsMixin)
|
||||
from plugin.registry import registry
|
||||
from plugin.urls import PLUGIN_BASE
|
||||
|
||||
|
||||
class BaseMixinDefinition:
|
||||
|
@ -3,7 +3,7 @@ ignore =
|
||||
# - W605 - invalid escape sequence
|
||||
W605,
|
||||
# - E501 - line too long (82 characters)
|
||||
E501,
|
||||
E501,
|
||||
# - E722 - do not use bare except
|
||||
E722,
|
||||
# - C901 - function is too complex
|
||||
@ -28,6 +28,4 @@ source = ./InvenTree
|
||||
src_paths=InvenTree
|
||||
skip_glob =*/migrations/*.py
|
||||
known_django=django
|
||||
import_heading_firstparty=InvenTree imports
|
||||
import_heading_thirdparty=Third-Party imports
|
||||
sections=FUTURE, STDLIB, DJANGO, THIRDPARTY, FIRSTPARTY, LOCALFOLDER
|
||||
|
Loading…
Reference in New Issue
Block a user