From 7c9f0a93d5d6f9933bae471d21190597afb6bca1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Vinot?= Date: Thu, 13 Jun 2024 14:09:37 +0200 Subject: [PATCH] fix: Please the MyPy gods --- pylookyloo/api.py | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/pylookyloo/api.py b/pylookyloo/api.py index ef5ba7f..17e2e35 100644 --- a/pylookyloo/api.py +++ b/pylookyloo/api.py @@ -486,6 +486,26 @@ def send_mail(self, tree_uuid: str, email: str = '', comment: str | None = None) r = self.session.post(urljoin(self.root_url, str(PurePosixPath('json', tree_uuid, 'report'))), json=to_send) return r.json() + @overload + def upload_capture(self, *, quiet: Literal[True], + listing: bool = False, + full_capture: Path | BytesIO | str | None = None, + har: Path | BytesIO | str | None = None, + html: Path | BytesIO | str | None = None, + last_redirected_url: str | None = None, + screenshot: Path | BytesIO | str | None = None) -> str: + ... + + @overload + def upload_capture(self, *, quiet: Literal[False]=False, + listing: bool = False, + full_capture: Path | BytesIO | str | None = None, + har: Path | BytesIO | str | None = None, + html: Path | BytesIO | str | None = None, + last_redirected_url: str | None = None, + screenshot: Path | BytesIO | str | None = None) -> tuple[str, dict[str, str]]: + ... + def upload_capture(self, *, quiet: bool = False, listing: bool = False, full_capture: Path | BytesIO | str | None = None,