Skip to content

Commit 97e12ac

Browse files
committed
f
1 parent bdb21c6 commit 97e12ac

File tree

2 files changed

+9
-16
lines changed

2 files changed

+9
-16
lines changed

examples/basic_example.py

Lines changed: 8 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
"""
66

77
import argparse
8+
89
from replicated import ReplicatedClient
910

1011

@@ -13,31 +14,23 @@ def main():
1314
parser.add_argument(
1415
"--base-url",
1516
default="https://replicated.app",
16-
help="Base URL for the Replicated API (default: https://replicated.app)"
17+
help="Base URL for the Replicated API (default: https://replicated.app)",
1718
)
1819
parser.add_argument(
1920
"--publishable-key",
2021
required=True,
21-
help="Your Replicated publishable key (required)"
22+
help="Your Replicated publishable key (required)",
2223
)
2324
parser.add_argument(
24-
"--app-slug",
25-
required=True,
26-
help="Your application slug (required)"
25+
"--app-slug", required=True, help="Your application slug (required)"
2726
)
2827
parser.add_argument(
2928
"--customer-email",
3029
default="[email protected]",
31-
help="Customer email address (default: [email protected])"
32-
)
33-
parser.add_argument(
34-
"--channel",
35-
help="Channel for the customer (optional)"
36-
)
37-
parser.add_argument(
38-
"--customer-name",
39-
help="Customer name (optional)"
30+
help="Customer email address (default: [email protected])",
4031
)
32+
parser.add_argument("--channel", help="Channel for the customer (optional)")
33+
parser.add_argument("--customer-name", help="Customer name (optional)")
4134

4235
args = parser.parse_args()
4336

@@ -63,7 +56,7 @@ def main():
6356
customer = client.customer.get_or_create(
6457
email_address=args.customer_email,
6558
channel=args.channel,
66-
name=args.customer_name
59+
name=args.customer_name,
6760
)
6861
print(f"✓ Customer created/retrieved - ID: {customer.customer_id}")
6962

tests/test_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ def test_customer_creation(self, mock_httpx):
2626
"customer": {
2727
"id": "customer_123",
2828
"email": "[email protected]",
29-
"name": "test user"
29+
"name": "test user",
3030
}
3131
}
3232

0 commit comments

Comments
 (0)