Skip to content

Commit

Permalink
black line-length linting changes #353
Browse files Browse the repository at this point in the history
  • Loading branch information
rowan04 committed Nov 21, 2024
1 parent bdb3785 commit 3cdae51
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -186,8 +186,9 @@ def partial_update_catalogue_category(
logger.exception(message)
raise HTTPException(status_code=status.HTTP_404_NOT_FOUND, detail=message) from exc
except ChildElementsExistError as exc:
message = ("Catalogue category has child elements, so the following fields cannot be updated: "
+ ', '.join(CATALOGUE_CATEGORY_WITH_CHILD_NON_EDITABLE_FIELDS))
message = "Catalogue category has child elements, so the following fields cannot be updated: " + ", ".join(
CATALOGUE_CATEGORY_WITH_CHILD_NON_EDITABLE_FIELDS
)
logger.exception(message)
raise HTTPException(status_code=status.HTTP_409_CONFLICT, detail=message) from exc
except DuplicateRecordError as exc:
Expand Down
5 changes: 3 additions & 2 deletions inventory_management_system_api/routers/v1/catalogue_item.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,8 +162,9 @@ def partial_update_catalogue_item(
logger.exception(message)
raise HTTPException(status_code=status.HTTP_409_CONFLICT, detail=message) from exc
except ChildElementsExistError as exc:
message = ("Catalogue item has child elements, so the following fields cannot be updated: "
+ ', '.join(CATALOGUE_ITEM_WITH_CHILD_NON_EDITABLE_FIELDS))
message = "Catalogue item has child elements, so the following fields cannot be updated: " + ", ".join(
CATALOGUE_ITEM_WITH_CHILD_NON_EDITABLE_FIELDS
)
logger.exception(message)
raise HTTPException(status_code=status.HTTP_409_CONFLICT, detail=message) from exc
except InvalidActionError as exc:
Expand Down
8 changes: 4 additions & 4 deletions test/e2e/test_catalogue_category.py
Original file line number Diff line number Diff line change
Expand Up @@ -993,7 +993,7 @@ def test_partial_update_non_leaf_to_leaf_when_has_child_catalogue_category(self)
self.check_patch_catalogue_category_failed_with_detail(
409,
"Catalogue category has child elements, so the following fields cannot be updated: "
+ ', '.join(CATALOGUE_CATEGORY_WITH_CHILD_NON_EDITABLE_FIELDS)
+ ", ".join(CATALOGUE_CATEGORY_WITH_CHILD_NON_EDITABLE_FIELDS),
)

def test_partial_update_leaf_all_valid_values_when_no_children(self):
Expand Down Expand Up @@ -1040,7 +1040,7 @@ def test_partial_update_leaf_to_non_leaf_when_has_child_catalogue_item(self):
self.check_patch_catalogue_category_failed_with_detail(
409,
"Catalogue category has child elements, so the following fields cannot be updated: "
+ ', '.join(CATALOGUE_CATEGORY_WITH_CHILD_NON_EDITABLE_FIELDS)
+ ", ".join(CATALOGUE_CATEGORY_WITH_CHILD_NON_EDITABLE_FIELDS),
)

def test_partial_update_leaf_properties_when_has_child_catalogue_item(self):
Expand All @@ -1054,7 +1054,7 @@ def test_partial_update_leaf_properties_when_has_child_catalogue_item(self):
self.check_patch_catalogue_category_failed_with_detail(
409,
"Catalogue category has child elements, so the following fields cannot be updated: "
+ ', '.join(CATALOGUE_CATEGORY_WITH_CHILD_NON_EDITABLE_FIELDS)
+ ", ".join(CATALOGUE_CATEGORY_WITH_CHILD_NON_EDITABLE_FIELDS),
)

def test_partial_update_leaf_to_non_leaf_with_properties(self):
Expand Down Expand Up @@ -1099,7 +1099,7 @@ def test_partial_update_is_leaf_with_child_catalogue_category(self):
self.check_patch_catalogue_category_failed_with_detail(
409,
"Catalogue category has child elements, so the following fields cannot be updated: "
+ ', '.join(CATALOGUE_CATEGORY_WITH_CHILD_NON_EDITABLE_FIELDS)
+ ", ".join(CATALOGUE_CATEGORY_WITH_CHILD_NON_EDITABLE_FIELDS),
)

def test_partial_update_leaf_properties(self):
Expand Down
4 changes: 2 additions & 2 deletions test/e2e/test_catalogue_item.py
Original file line number Diff line number Diff line change
Expand Up @@ -1188,7 +1188,7 @@ def test_partial_update_manufacturer_id_with_children(self):
self.check_patch_catalogue_item_failed_with_detail(
409,
"Catalogue item has child elements, so the following fields cannot be updated: "
+ ', '.join(CATALOGUE_ITEM_WITH_CHILD_NON_EDITABLE_FIELDS)
+ ", ".join(CATALOGUE_ITEM_WITH_CHILD_NON_EDITABLE_FIELDS),
)

def test_partial_update_manufacturer_id_with_non_existent_id(self):
Expand Down Expand Up @@ -1465,7 +1465,7 @@ def test_partial_update_properties_with_children(self):
self.check_patch_catalogue_item_failed_with_detail(
409,
"Catalogue item has child elements, so the following fields cannot be updated: "
+ ', '.join(CATALOGUE_ITEM_WITH_CHILD_NON_EDITABLE_FIELDS)
+ ", ".join(CATALOGUE_ITEM_WITH_CHILD_NON_EDITABLE_FIELDS),
)

def test_partial_update_obsolete_replacement_catalogue_item_id(self):
Expand Down

0 comments on commit 3cdae51

Please sign in to comment.