mirror of
https://github.com/inventree/InvenTree.git
synced 2025-07-16 17:56:30 +00:00
PEP fixes
This commit is contained in:
@@ -2,4 +2,4 @@
|
||||
The InvenTree module provides high-level management and functionality.
|
||||
|
||||
It provides a number of helper functions and generic classes which are used by InvenTree apps.
|
||||
"""
|
||||
"""
|
||||
|
@@ -1,4 +1,4 @@
|
||||
"""
|
||||
"""
|
||||
Helper forms which subclass Django forms to provide additional functionality
|
||||
"""
|
||||
|
||||
|
@@ -9,7 +9,7 @@ from django.http import StreamingHttpResponse
|
||||
|
||||
|
||||
def str2bool(text, test=True):
|
||||
""" Test if a string 'looks' like a boolean value.
|
||||
""" Test if a string 'looks' like a boolean value.
|
||||
|
||||
Args:
|
||||
text: Input text
|
||||
|
@@ -7,7 +7,6 @@ from __future__ import unicode_literals
|
||||
from django.db import models
|
||||
from django.contrib.contenttypes.models import ContentType
|
||||
from rest_framework.exceptions import ValidationError
|
||||
from .helpers import str2bool
|
||||
|
||||
from django.db.models.signals import pre_delete
|
||||
from django.dispatch import receiver
|
||||
@@ -125,7 +124,7 @@ class InvenTreeTree(models.Model):
|
||||
e.g. ["Top", "Second", "Third", "This"]
|
||||
|
||||
Returns:
|
||||
List of category names from the top level to this category
|
||||
List of category names from the top level to this category
|
||||
"""
|
||||
return self.parentpath + [self]
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
"""
|
||||
"""
|
||||
Serializers used in various InvenTree apps
|
||||
"""
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
"""
|
||||
"""
|
||||
Various Views which provide extra functionality over base Django Views.
|
||||
|
||||
In particular these views provide base functionality for rendering Django forms
|
||||
@@ -20,7 +20,7 @@ from rest_framework import views
|
||||
|
||||
class TreeSerializer(views.APIView):
|
||||
""" JSON View for serializing a Tree object.
|
||||
"""
|
||||
"""
|
||||
|
||||
def itemToJson(self, item):
|
||||
|
||||
@@ -259,7 +259,7 @@ class IndexView(TemplateView):
|
||||
|
||||
|
||||
class SearchView(TemplateView):
|
||||
""" View for InvenTree search page.
|
||||
""" View for InvenTree search page.
|
||||
|
||||
Displays results of search query
|
||||
"""
|
||||
|
Reference in New Issue
Block a user