Skip to content

Commit a570fdb

Browse files
davidweteringsmvantellingen
authored andcommitted
fix: adjust black 20 to latest 19 version, since 20 has bugs
1 parent 6c7e829 commit a570fdb

File tree

16 files changed

+51
-29
lines changed

16 files changed

+51
-29
lines changed

codegen/main.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -104,11 +104,10 @@ def reformat_code(filename: str):
104104

105105
src = Path(filename)
106106
report = black.Report()
107-
mode = black.Mode()
107+
mode = black.FileMode(line_length=88)
108108
black.reformat_one(
109109
src=src,
110-
# https://github.com/psf/black/issues/1629 known issue
111-
fast=True,
110+
fast=False,
112111
write_back=black.WriteBack.YES,
113112
mode=mode,
114113
report=report,

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"astunparse==1.6.3",
1919
"astor==0.8.1",
2020
"attrs>=20.3.0",
21-
"black==20.8b1",
21+
"black==19.10b0",
2222
"isort==5.6.4",
2323
"PyYAML==5.3.1",
2424
]

src/commercetools/services/carts.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,8 @@ def query(
8787
predicate_var: typing.Dict[str, str] = None,
8888
customer_id: str = None,
8989
) -> CartPagedQueryResponse:
90-
"""A shopping cart holds product variants and can be ordered."""
90+
"""A shopping cart holds product variants and can be ordered.
91+
"""
9192
params = self._serialize_params(
9293
{
9394
"expand": expand,

src/commercetools/services/categories.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,8 @@ def query(
6363
where: OptionalListStr = None,
6464
predicate_var: typing.Dict[str, str] = None,
6565
) -> CategoryPagedQueryResponse:
66-
"""Categories are used to organize products in a hierarchical structure."""
66+
"""Categories are used to organize products in a hierarchical structure.
67+
"""
6768
params = self._serialize_params(
6869
{
6970
"expand": expand,

src/commercetools/services/custom_objects.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,8 @@ def query_by_container(
9696
where: OptionalListStr = None,
9797
predicate_var: typing.Dict[str, str] = None,
9898
) -> CustomObjectPagedQueryResponse:
99-
"""Store custom JSON values."""
99+
"""Store custom JSON values.
100+
"""
100101
params = self._serialize_params(
101102
{
102103
"expand": expand,

src/commercetools/services/customer_groups.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,8 @@ def query(
6868
where: OptionalListStr = None,
6969
predicate_var: typing.Dict[str, str] = None,
7070
) -> CustomerGroupPagedQueryResponse:
71-
"""customer-groups are used to evaluate products and channels."""
71+
"""customer-groups are used to evaluate products and channels.
72+
"""
7273
params = self._serialize_params(
7374
{
7475
"expand": expand,
@@ -90,7 +91,8 @@ def query(
9091
def create(
9192
self, draft: CustomerGroupDraft, *, expand: OptionalListStr = None
9293
) -> CustomerGroup:
93-
"""customer-groups are used to evaluate products and channels."""
94+
"""customer-groups are used to evaluate products and channels.
95+
"""
9496
params = self._serialize_params({"expand": expand}, traits.ExpandableSchema)
9597
return self._client._post(
9698
endpoint="customer-groups",

src/commercetools/services/extensions.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,8 @@ def query(
6565
where: OptionalListStr = None,
6666
predicate_var: typing.Dict[str, str] = None,
6767
) -> ExtensionPagedQueryResponse:
68-
"""Extend the behavior of an API with your business logic"""
68+
"""Extend the behavior of an API with your business logic
69+
"""
6970
params = self._serialize_params(
7071
{
7172
"expand": expand,

src/commercetools/services/inventory.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,8 @@ def query(
5757
where: OptionalListStr = None,
5858
predicate_var: typing.Dict[str, str] = None,
5959
) -> InventoryPagedQueryResponse:
60-
"""Inventory allows you to track stock quantities."""
60+
"""Inventory allows you to track stock quantities.
61+
"""
6162
params = self._serialize_params(
6263
{
6364
"expand": expand,
@@ -79,7 +80,8 @@ def query(
7980
def create(
8081
self, draft: InventoryEntryDraft, *, expand: OptionalListStr = None
8182
) -> InventoryEntry:
82-
"""Inventory allows you to track stock quantities."""
83+
"""Inventory allows you to track stock quantities.
84+
"""
8385
params = self._serialize_params({"expand": expand}, traits.ExpandableSchema)
8486
return self._client._post(
8587
endpoint="inventory",

src/commercetools/services/me.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,8 @@ def my_cart_query(
128128
where: OptionalListStr = None,
129129
predicate_var: typing.Dict[str, str] = None,
130130
) -> CartPagedQueryResponse:
131-
"""A shopping cart holds product variants and can be ordered."""
131+
"""A shopping cart holds product variants and can be ordered.
132+
"""
132133
params = self._serialize_params(
133134
{
134135
"expand": expand,
@@ -282,7 +283,8 @@ def create(self) -> MyCustomer:
282283
def my_cart_create(
283284
self, draft: MyCartDraft, *, expand: OptionalListStr = None
284285
) -> MyCart:
285-
"""A shopping cart holds product variants and can be ordered."""
286+
"""A shopping cart holds product variants and can be ordered.
287+
"""
286288
params = self._serialize_params({"expand": expand}, traits.ExpandableSchema)
287289
return self._client._post(
288290
endpoint="me/carts",

src/commercetools/services/product_discounts.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,8 @@ def query(
7171
where: OptionalListStr = None,
7272
predicate_var: typing.Dict[str, str] = None,
7373
) -> ProductDiscountPagedQueryResponse:
74-
"""Product discounts are used to change certain product prices."""
74+
"""Product discounts are used to change certain product prices.
75+
"""
7576
params = self._serialize_params(
7677
{
7778
"expand": expand,
@@ -93,7 +94,8 @@ def query(
9394
def create(
9495
self, draft: ProductDiscountDraft, *, expand: OptionalListStr = None
9596
) -> ProductDiscount:
96-
"""Product discounts are used to change certain product prices."""
97+
"""Product discounts are used to change certain product prices.
98+
"""
9799
params = self._serialize_params({"expand": expand}, traits.ExpandableSchema)
98100
return self._client._post(
99101
endpoint="product-discounts",

0 commit comments

Comments
 (0)