Skip to content

Commit 3bd2d89

Browse files
committed
style: format code for better readability in examples and modules
1 parent 8315047 commit 3bd2d89

4 files changed

Lines changed: 12 additions & 6 deletions

File tree

examples/basic_usage.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,9 @@ def main():
2222
try:
2323
client = PathaoClient(
2424
client_id=os.getenv("PATHAO_CLIENT_ID", "7N1aMJQbWm"),
25-
client_secret=os.getenv("PATHAO_CLIENT_SECRET", "wRcaibZkUdSNz2EI9ZyuXLlNrnAv0TdPUPXMnD39"),
25+
client_secret=os.getenv(
26+
"PATHAO_CLIENT_SECRET", "wRcaibZkUdSNz2EI9ZyuXLlNrnAv0TdPUPXMnD39"
27+
),
2628
username=os.getenv("PATHAO_USERNAME", "test@pathao.com"),
2729
password=os.getenv("PATHAO_PASSWORD", "lovePathao"),
2830
environment="sandbox", # Use "production" for live

examples/create_order.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,9 @@ def main():
182182
try:
183183
client = PathaoClient(
184184
client_id=os.getenv("PATHAO_CLIENT_ID", "7N1aMJQbWm"),
185-
client_secret=os.getenv("PATHAO_CLIENT_SECRET", "wRcaibZkUdSNz2EI9ZyuXLlNrnAv0TdPUPXMnD39"),
185+
client_secret=os.getenv(
186+
"PATHAO_CLIENT_SECRET", "wRcaibZkUdSNz2EI9ZyuXLlNrnAv0TdPUPXMnD39"
187+
),
186188
username=os.getenv("PATHAO_USERNAME", "test@pathao.com"),
187189
password=os.getenv("PATHAO_PASSWORD", "lovePathao"),
188190
environment="sandbox",

pathao/modules/order.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ def create(
102102
order_data = response["data"]
103103
else:
104104
order_data = response
105-
105+
106106
return Order(
107107
consignment_id=order_data["consignment_id"],
108108
merchant_order_id=order_data["merchant_order_id"],
@@ -199,7 +199,7 @@ def get_info(self, consignment_id: str) -> OrderInfo:
199199
order_data = response["data"]
200200
else:
201201
order_data = response
202-
202+
203203
return OrderInfo(
204204
consignment_id=order_data["consignment_id"],
205205
merchant_order_id=order_data["merchant_order_id"],

pathao/modules/price.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,9 @@ def calculate(
5656
}
5757

5858
# Make API request
59-
response = self.http_client.post("aladdin/api/v1/merchant/price-plan", headers, data)
59+
response = self.http_client.post(
60+
"aladdin/api/v1/merchant/price-plan", headers, data
61+
)
6062

6163
# Parse response
6264
if "data" in response and "data" in response["data"]:
@@ -65,7 +67,7 @@ def calculate(
6567
price_data = response["data"]
6668
else:
6769
price_data = response
68-
70+
6971
return PriceDetails(
7072
price=float(price_data["price"]),
7173
discount=float(price_data["discount"]),

0 commit comments

Comments
 (0)