Skip to content

Commit

Permalink
Fixed mypy issues in python example.
Browse files Browse the repository at this point in the history
  • Loading branch information
Randy808 committed May 31, 2024
1 parent 6b6a9fd commit 9972836
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions examples/python/getting-started/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
def upgrade_device_certs_to_creds(
scheduler: Scheduler, signer: Signer, device_cert: bytes, device_key: bytes
):
device_creds = Credentials.from_parts(device_cert, device_key)
return device_creds.upgrade(scheduler, signer)
device_creds = Credentials.from_parts(device_cert, device_key, rune="")
return device_creds.upgrade(scheduler.inner, signer.inner)
# ---8<--- [end: upgrade_device_certs_to_creds]


Expand Down
4 changes: 2 additions & 2 deletions libs/gl-client-py/glclient/glclient.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@ class TlsConfig:
class Credentials:
def __init__(self) -> None: ...
@staticmethod
def nobody_with(cert: bytes, key: bytes, ca: bytes=None) -> Credentials: ...
def nobody_with(cert: bytes, key: bytes, ca: Optional[bytes] = None) -> Credentials: ...
@staticmethod
def from_bytes(data: bytes) -> Credentials: ...
@staticmethod
def from_path(path: str) -> Credentials: ...
@staticmethod
def from_parts(cert: bytes, key: bytes, rune: str, ca: bytes=None) -> Credentials: ...
def from_parts(cert: bytes, key: bytes, rune: str, ca: Optional[bytes] = None) -> Credentials: ...
def node_id(self) -> bytes: ...
def upgrade(self, scheduler: Scheduler, signer: Signer) -> Credentials: ...
def to_bytes(self) -> bytes: ...
Expand Down

0 comments on commit 9972836

Please sign in to comment.