chore: add type hints

This commit is contained in:
tiagovla committed 2025-01-03 17:53:45 -03:00
1 parent e36e1f73c5
commit 7c5c92f27a
3 files changed
+5 -3

No files matched your search

+2 -1
View File
@@ -18,7 +18,8 @@ class HttpClient:
logger.debug(f"Request: {url} Status: {resp.status}")
if resp.status != 200:
raise RequestException(
f"Request to url {url} with method {method} failed with status code {resp.status}."
f"Request to url {url} with method {method} failed "
" with status code {resp.status}."
)
return await resp.text()
+1 -1
View File
@@ -37,7 +37,7 @@ class AttendencyPage:
def history(self) -> AttendencyHistory:
return self._history
def is_available(self):
def is_available(self) -> bool:
return self._available
async def confirm(self) -> None:
+2 -1
View File
@@ -1,9 +1,10 @@
from typing import Any
from functools import wraps
def is_logged_check(method):
@wraps(method)
def wrapper(self, *args, **kwargs):
def wrapper(self, *args: Any, **kwargs: Any) -> Any:
if not self.is_logged:
raise Exception("You must be logged in to use this method")
return method(self, *args, **kwargs)