mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
PEP fixes
This commit is contained in:
parent
aa04941bf1
commit
d55ea1a982
@ -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
|
||||
"""
|
||||
|
@ -2,4 +2,4 @@
|
||||
The Build module is responsible for managing "Build" transactions.
|
||||
|
||||
A Build consumes parts from stock to create new parts
|
||||
"""
|
||||
"""
|
||||
|
@ -55,7 +55,6 @@ class Build(models.Model):
|
||||
batch = models.CharField(max_length=100, blank=True, null=True,
|
||||
help_text='Batch code for this build output')
|
||||
|
||||
|
||||
#: Date the build model was 'created'
|
||||
creation_date = models.DateField(auto_now=True, editable=False)
|
||||
|
||||
|
@ -5,4 +5,4 @@ A company can be either (or both):
|
||||
|
||||
- Supplier
|
||||
- Customer
|
||||
"""
|
||||
"""
|
||||
|
@ -1,4 +1,4 @@
|
||||
"""
|
||||
"""
|
||||
JSON serializers for Company app
|
||||
"""
|
||||
|
||||
|
@ -17,7 +17,7 @@ from .forms import CompanyImageForm
|
||||
|
||||
|
||||
class CompanyIndex(ListView):
|
||||
""" View for displaying list of companies
|
||||
""" View for displaying list of companies
|
||||
"""
|
||||
|
||||
model = Company
|
||||
|
@ -7,4 +7,4 @@ It includes models for:
|
||||
- Part
|
||||
- SupplierPart
|
||||
- BomItem
|
||||
"""
|
||||
"""
|
||||
|
@ -226,7 +226,7 @@ class SupplierPartDetail(generics.RetrieveUpdateDestroyAPIView):
|
||||
|
||||
|
||||
class SupplierPriceBreakList(generics.ListCreateAPIView):
|
||||
""" API endpoint for list view of SupplierPriceBreak object
|
||||
""" API endpoint for list view of SupplierPriceBreak object
|
||||
|
||||
- GET: Retrieve list of SupplierPriceBreak objects
|
||||
- POST: Create a new SupplierPriceBreak object
|
||||
|
@ -6,4 +6,4 @@ It includes models for:
|
||||
- StockLocation
|
||||
- StockItem
|
||||
- StockItemTracking
|
||||
"""
|
||||
"""
|
||||
|
Loading…
Reference in New Issue
Block a user