mirror of
https://github.com/inventree/InvenTree.git
synced 2025-06-17 04:25:42 +00:00
Fix common spelling mistakes (#4956)
* add codespell * first fixes * doc fixes * fix docstrings and comments * functional changes * docstrings again * and docs again * rename args * add ignore * use pre-commit for filtering instead * ups * fix typo in filter
This commit is contained in:
@ -131,7 +131,7 @@ class Build(MPTTModel, InvenTree.models.InvenTreeBarcodeMixin, InvenTree.models.
|
||||
# Order was completed within the specified range
|
||||
completed = Q(status=BuildStatus.COMPLETE) & Q(completion_date__gte=min_date) & Q(completion_date__lte=max_date)
|
||||
|
||||
# Order target date falls witin specified range
|
||||
# Order target date falls within specified range
|
||||
pending = Q(status__in=BuildStatus.ACTIVE_CODES) & ~Q(target_date=None) & Q(target_date__gte=min_date) & Q(target_date__lte=max_date)
|
||||
|
||||
# TODO - Construct a queryset for "overdue" orders
|
||||
@ -310,7 +310,7 @@ class Build(MPTTModel, InvenTree.models.InvenTreeBarcodeMixin, InvenTree.models.
|
||||
"""Return the number of sub builds under this one.
|
||||
|
||||
Args:
|
||||
cascade: If True (defualt), include cascading builds under sub builds
|
||||
cascade: If True (default), include cascading builds under sub builds
|
||||
"""
|
||||
return self.sub_builds(cascade=cascade).count()
|
||||
|
||||
|
@ -91,7 +91,7 @@ class BuildSerializer(InvenTreeModelSerializer):
|
||||
def annotate_queryset(queryset):
|
||||
"""Add custom annotations to the BuildSerializer queryset, performing database queries as efficiently as possible.
|
||||
|
||||
The following annoted fields are added:
|
||||
The following annotated fields are added:
|
||||
|
||||
- overdue: True if the build is outstanding *and* the completion date has past
|
||||
"""
|
||||
|
@ -541,10 +541,10 @@ class BuildTest(BuildAPITest):
|
||||
{
|
||||
'export': 'csv',
|
||||
}
|
||||
) as fo:
|
||||
) as file:
|
||||
|
||||
data = self.process_csv(
|
||||
fo,
|
||||
file,
|
||||
required_cols=required_cols,
|
||||
excluded_cols=excluded_cols,
|
||||
required_rows=Build.objects.count()
|
||||
|
@ -679,7 +679,7 @@ class AutoAllocationTests(BuildTestBase):
|
||||
self.assertEqual(self.build.unallocated_quantity(self.bom_item_1), 0)
|
||||
self.assertEqual(self.build.unallocated_quantity(self.bom_item_2), 5)
|
||||
|
||||
# This time, allow substitue parts to be used!
|
||||
# This time, allow substitute parts to be used!
|
||||
self.build.auto_allocate_stock(
|
||||
interchangeable=True,
|
||||
substitutes=True,
|
||||
|
Reference in New Issue
Block a user