Skip to content
This repository was archived by the owner on Jun 5, 2025. It is now read-only.

Commit 35633ba

Browse files
committed
fix lints
1 parent 12de05d commit 35633ba

File tree

2 files changed

+11
-6
lines changed

2 files changed

+11
-6
lines changed

cert_gen.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ def generate_certificates(cert_dir="certs"):
8484
# CA END
8585

8686
# SERVER BEGIN
87-
87+
8888
# Generate new certificate for domain
8989
server_key = rsa.generate_private_key(
9090
public_exponent=65537,
@@ -150,11 +150,13 @@ def generate_certificates(cert_dir="certs"):
150150
print("\nTo trust these certificates:")
151151
print("\nOn macOS:")
152152
print(
153-
"sudo security add-trusted-cert -d -r trustRoot -k /Library/Keychains/System.keychain certs/server.crt"
153+
"sudo security add-trusted-cert -d -r trustRoot "
154+
"-k /Library/Keychains/System.keychain certs/server.crt"
154155
)
155156
print("\nOn Windows (PowerShell as Admin):")
156157
print(
157-
'Import-Certificate -FilePath "certs\\server.crt" -CertStoreLocation Cert:\\LocalMachine\\Root'
158+
'Import-Certificate -FilePath "certs\\server.crt" '
159+
'-CertStoreLocation Cert:\\LocalMachine\\Root'
158160
)
159161
print("\nOn Linux:")
160162
print("sudo cp certs/server.crt /usr/local/share/ca-certificates/proxy-pilot.crt")

src/codegate/ca/codegate_ca.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -373,11 +373,13 @@ def generate_certificates(self) -> Tuple[str, str]:
373373
print("\nTo trust these certificates:")
374374
print("\nOn macOS:")
375375
print(
376-
"`sudo security add-trusted-cert -d -r trustRoot -k /Library/Keychains/System.keychain certs/ca.crt"
376+
"`sudo security add-trusted-cert -d -r trustRoot "
377+
"-k /Library/Keychains/System.keychain certs/ca.crt"
377378
)
378379
print("\nOn Windows (PowerShell as Admin):")
379380
print(
380-
'Import-Certificate -FilePath "certs\\ca.crt" -CertStoreLocation Cert:\\LocalMachine\\Root'
381+
'Import-Certificate -FilePath "certs\\ca.crt" '
382+
'-CertStoreLocation Cert:\\LocalMachine\\Root'
381383
)
382384
print("\nOn Linux:")
383385
print("sudo cp certs/ca.crt /usr/local/share/ca-certificates/codegate.crt")
@@ -433,7 +435,8 @@ def ensure_certificates_exist(self) -> None:
433435
self.generate_certificates()
434436
else:
435437
logger.debug(
436-
f"Certificates found at: {Config.get_config().server_cert} and {Config.get_config().server_key}"
438+
f"Certificates found at: {Config.get_config().server_cert} "
439+
"and {Config.get_config().server_key}"
437440
)
438441

439442
def get_ssl_context(self) -> ssl.SSLContext:

0 commit comments

Comments
 (0)