From d64165b5d94bce8c2560f49e9a7333afc49d6a61 Mon Sep 17 00:00:00 2001 From: Mattt Zmuda Date: Thu, 25 Jul 2024 12:31:08 -0700 Subject: [PATCH 1/2] Fix pylint warnings Signed-off-by: Mattt Zmuda --- replicate/webhook.py | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/replicate/webhook.py b/replicate/webhook.py index 4258a05c..22dc9ab3 100644 --- a/replicate/webhook.py +++ b/replicate/webhook.py @@ -15,6 +15,10 @@ class WebhookSigningSecret(Resource): + """ + A webhook signing secret. + """ + key: str @@ -43,6 +47,10 @@ class InvalidSignatureError(WebhookValidationError): class Webhooks(Namespace): + """ + Namespace for operations related to webhooks. + """ + @property def default(self) -> "Webhooks.Default": """ @@ -52,6 +60,10 @@ def default(self) -> "Webhooks.Default": return self.Default(self._client) class Default(Namespace): + """ + Namespace for operations related to the default webhook. + """ + def secret(self) -> WebhookSigningSecret: """ Get the default webhook signing secret. @@ -94,7 +106,7 @@ def validate( ) -> bool: ... @staticmethod - def validate( # type: ignore + def validate( # type: ignore # pylint: disable=too-many-branches,too-many-locals request: Optional["httpx.Request"] = None, headers: Optional[Dict[str, str]] = None, body: Optional[str] = None, From 9a57919567402454b94e0c67d85dd3450910e9df Mon Sep 17 00:00:00 2001 From: Mattt Zmuda Date: Thu, 25 Jul 2024 12:33:00 -0700 Subject: [PATCH 2/2] Ignore UP037 [*] Remove quotes from type annotation Signed-off-by: Mattt Zmuda --- pyproject.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/pyproject.toml b/pyproject.toml index 422609d1..79ca860a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -75,6 +75,7 @@ ignore = [ "ANN101", # Missing type annotation for self in method "ANN102", # Missing type annotation for cls in classmethod "W191", # Indentation contains tabs + "UP037", # Remove quotes from type annotation ] [tool.ruff.lint.per-file-ignores]