Skip to content

Commit

Permalink
fix: reolve comments by removing args and formatting with black
Browse files Browse the repository at this point in the history
  • Loading branch information
onecrazygenius committed Dec 6, 2024
1 parent bce6617 commit 5581e79
Showing 1 changed file with 5 additions and 14 deletions.
19 changes: 5 additions & 14 deletions lib/python/src/bailo/core/agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,27 +64,20 @@ def put(self, *args, **kwargs):


class PkiAgent(Agent):
def __init__(
self,
cert: str,
key: str,
auth: str,
*args,
**kwargs
):
def __init__(self, cert: str, key: str, auth: str, **kwargs):
"""Initiate an agent for PKI authentication.
:param cert: Path to cert file
:param key: Path to key file
:param auth: Path to certificate authority file
"""
super().__init__(verify=auth, *args, **kwargs)
super().__init__(verify=auth, **kwargs)

self.cert = cert
self.key = key

def get(self, *args, **kwargs):
return super().get(*args, cert=(self.cert, self.key), **kwargs)
def get(self, **kwargs):
return super().get(cert=(self.cert, self.key), **kwargs)

def post(self, *args, **kwargs):
return super().post(*args, cert=(self.cert, self.key), **kwargs)
Expand All @@ -104,16 +97,14 @@ def __init__(
self,
access_key: str | None = None,
secret_key: str | None = None,
*args,
**kwargs,
):
"""Initiate an agent for API token authentication.
:param access_key: Access key
:param secret_key: Secret key
:param verify: Path to certificate authority file, or bool for SSL verification.
"""
super().__init__(*args, **kwargs)
super().__init__(**kwargs)

if access_key is None:
logger.info("Access key not provided. Trying other sources...")
Expand Down

0 comments on commit 5581e79

Please sign in to comment.