From 03bae38f51e00a9f87dc476a9868464547aceb01 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Vinot?= Date: Fri, 12 Apr 2024 11:19:18 +0200 Subject: [PATCH] fix: incorrect typing def --- examples/get_contacts.py | 2 +- pylookyloo/api.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/get_contacts.py b/examples/get_contacts.py index 8cb26c3..d90feb0 100644 --- a/examples/get_contacts.py +++ b/examples/get_contacts.py @@ -8,7 +8,7 @@ lookyloo = Lookyloo() -details: dict[str, Any] +details: list[dict[str, Any]] details = lookyloo.get_takedown_information('uuid') details = lookyloo.get_takedown_information('uuid', False) emails: list[str] = lookyloo.get_takedown_information('uuid', True) diff --git a/pylookyloo/api.py b/pylookyloo/api.py index b2c8ed3..dccdcaf 100644 --- a/pylookyloo/api.py +++ b/pylookyloo/api.py @@ -438,10 +438,10 @@ def get_takedown_information(self, capture_uuid: str, filter_contacts: Literal[T ... @overload - def get_takedown_information(self, capture_uuid: str, filter_contacts: Literal[False]=False) -> dict[str, Any]: + def get_takedown_information(self, capture_uuid: str, filter_contacts: Literal[False]=False) -> list[dict[str, Any]]: ... - def get_takedown_information(self, capture_uuid: str, filter_contacts: bool=False) -> dict[str, Any] | list[str]: + def get_takedown_information(self, capture_uuid: str, filter_contacts: bool=False) -> list[dict[str, Any]] | list[str]: '''Returns information required to request a takedown for a capture :param capture_uuid: UUID of the capture