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] 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,