Skip to content

Commit 05084e2

Browse files
fix: linting issues
1 parent c75e208 commit 05084e2

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
lines changed

commerce_coordinator/apps/commercetools/catalog_info/constants.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,13 +47,14 @@ class TwoUKeys:
4747

4848
# Program specifiic Line Item Custom Types
4949
PROGRAM_LINE_ITEMS_TYPE = 'programLineItemsCustomType'
50-
50+
5151
# ProgramID to store parent program
5252
PROGRAM_ID_LINE_ITEM = 'programID'
5353

5454
# Entitlement ID to store with line item
5555
ENTITLEMENT_ID_LINE_ITEM = 'edxLmsEntitlementId'
5656

57+
5758
class EdXFieldNames:
5859
"""edX Specific field names for use in Commercetools"""
5960

commerce_coordinator/apps/commercetools/catalog_info/foundational_types.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ class TwoUCustomTypes:
243243
key=TwoUKeys.PROGRAM_LINE_ITEMS_TYPE,
244244
name=ls({'en': 'Program Specifiic Line Item Custom Types'}),
245245
resource_type_ids=[ResourceTypeId.LINE_ITEM],
246-
246+
247247
field_definitions=[
248248
FieldDefinition(
249249
type=CustomFieldStringType(),

commerce_coordinator/apps/commercetools/management/commands/create_program_specific_custom_fields.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@ def handle_item_creation(self, custom_type):
1717
type_key = custom_type.key
1818
ret = self.ct_api_client.base_client.types.get_by_key(type_key)
1919
data = ret.serialize()
20-
print(f"{custom_type.resource_type_ids[0]} custom type with field {type_key} already exists: \n{json.dumps(data)}")
20+
print(f"{custom_type.resource_type_ids[0]} custom type with field {type_key} already exists: \n{
21+
json.dumps(data)}")
2122

2223
existing_fields = [field.get('name') for field in data.get('fieldDefinitions', [])]
2324

@@ -30,7 +31,8 @@ def handle_item_creation(self, custom_type):
3031

3132
except CommercetoolsError as ex:
3233
ret = self.ct_api_client.base_client.types.create(custom_type)
33-
print(f"Created {custom_type.resource_type_ids[0]} custom type with field {type_key}: {json.dumps(ret.serialize())}")
34+
print(f"Created {custom_type.resource_type_ids[0]} custom type with field {type_key}: {
35+
json.dumps(ret.serialize())}")
3436

3537
def handle(self, *args, **options):
3638
self.handle_item_creation(TwoUCustomTypes.PROGRAM_LINE_ITEM_TYPE_DRAFT)

0 commit comments

Comments
 (0)