summaryrefslogtreecommitdiff
path: root/kvmd/plugins/auth/http.py
diff options
context:
space:
mode:
authorMaxim Devaev <[email protected]>2022-09-04 18:08:40 +0300
committerMaxim Devaev <[email protected]>2022-09-04 18:08:40 +0300
commitee3e224e396494cd0d69bb6167087a071a20349c (patch)
tree5becd28570e58a03c6e1e231d0db24c264a73f88 /kvmd/plugins/auth/http.py
parent4b75221e9470b4a009955d7677f16adf8e23e302 (diff)
new typing style
Diffstat (limited to 'kvmd/plugins/auth/http.py')
-rw-r--r--kvmd/plugins/auth/http.py9
1 files changed, 3 insertions, 6 deletions
diff --git a/kvmd/plugins/auth/http.py b/kvmd/plugins/auth/http.py
index bfa3aa9f..aa80c2eb 100644
--- a/kvmd/plugins/auth/http.py
+++ b/kvmd/plugins/auth/http.py
@@ -20,9 +20,6 @@
# ========================================================================== #
-from typing import Dict
-from typing import Optional
-
import aiohttp
import aiohttp.web
@@ -57,10 +54,10 @@ class Plugin(BaseAuthService):
self.__passwd = passwd
self.__timeout = timeout
- self.__http_session: Optional[aiohttp.ClientSession] = None
+ self.__http_session: (aiohttp.ClientSession | None) = None
@classmethod
- def get_plugin_options(cls) -> Dict:
+ def get_plugin_options(cls) -> dict:
return {
"url": Option("http://localhost/auth"),
"verify": Option(True, type=valid_bool),
@@ -102,7 +99,7 @@ class Plugin(BaseAuthService):
def __ensure_http_session(self) -> aiohttp.ClientSession:
if not self.__http_session:
- kwargs: Dict = {}
+ kwargs: dict = {}
if self.__user:
kwargs["auth"] = aiohttp.BasicAuth(login=self.__user, password=self.__passwd)
if not self.__verify: