2
0
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:
Matthias Mair
2023-06-03 16:04:52 +02:00
committed by GitHub
parent 5e2bfaa43a
commit 21ed4b2081
161 changed files with 344 additions and 334 deletions

View File

@ -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()

View File

@ -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
"""

View File

@ -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()

View File

@ -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,