From 49315eceb8fd82cceb495e199d8a2846d561a79f Mon Sep 17 00:00:00 2001 From: rlaphoenix Date: Wed, 8 Nov 2023 22:56:37 +0000 Subject: [PATCH] Fix usage of __all__, add missing __all__ assignments --- pywidevine/cdm.py | 2 +- pywidevine/device.py | 2 +- pywidevine/key.py | 3 +++ pywidevine/pssh.py | 3 +++ pywidevine/remotecdm.py | 2 +- pywidevine/session.py | 3 +++ 6 files changed, 12 insertions(+), 3 deletions(-) diff --git a/pywidevine/cdm.py b/pywidevine/cdm.py index db83f45..ce1700f 100644 --- a/pywidevine/cdm.py +++ b/pywidevine/cdm.py @@ -638,4 +638,4 @@ class Cdm: return enc_key, mac_key_server, mac_key_client -__ALL__ = (Cdm,) +__all__ = ("Cdm",) diff --git a/pywidevine/device.py b/pywidevine/device.py index 4625cf5..afa438b 100644 --- a/pywidevine/device.py +++ b/pywidevine/device.py @@ -237,4 +237,4 @@ class Device: raise ValueError(f"Device Data seems to be corrupt or invalid, or migration failed, {e}") -__ALL__ = (Device, DeviceTypes) +__all__ = ("Device", "DeviceTypes") diff --git a/pywidevine/key.py b/pywidevine/key.py index 6b7ff90..c5f8b31 100644 --- a/pywidevine/key.py +++ b/pywidevine/key.py @@ -61,3 +61,6 @@ class Key: kid += b"\x00" * (16 - len(kid)) return UUID(bytes=kid) + + +__all__ = ("Key",) diff --git a/pywidevine/pssh.py b/pywidevine/pssh.py index 4eb4b61..b81111a 100644 --- a/pywidevine/pssh.py +++ b/pywidevine/pssh.py @@ -437,3 +437,6 @@ class PSSH: ] return uuids + + +__all__ = ("PSSH",) diff --git a/pywidevine/remotecdm.py b/pywidevine/remotecdm.py index 78e304d..7e79ce0 100644 --- a/pywidevine/remotecdm.py +++ b/pywidevine/remotecdm.py @@ -297,4 +297,4 @@ class RemoteCdm(Cdm): ] -__ALL__ = (RemoteCdm,) +__all__ = ("RemoteCdm",) diff --git a/pywidevine/session.py b/pywidevine/session.py index 1a2744e..7cb816f 100644 --- a/pywidevine/session.py +++ b/pywidevine/session.py @@ -13,3 +13,6 @@ class Session: self.service_certificate: Optional[SignedDrmCertificate] = None self.context: dict[bytes, tuple[bytes, bytes]] = {} self.keys: list[Key] = [] + + +__all__ = ("Session",)