From 41f3c459ed280bd2ee8aa04fec74983b4b3376e1 Mon Sep 17 00:00:00 2001 From: Dmitry Misharov Date: Sat, 9 Mar 2024 18:16:52 +0100 Subject: [PATCH] fix typing compat with older Python versions --- src/resources/lib/xbmc_settings.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/resources/lib/xbmc_settings.py b/src/resources/lib/xbmc_settings.py index ffc6765..2c4d642 100644 --- a/src/resources/lib/xbmc_settings.py +++ b/src/resources/lib/xbmc_settings.py @@ -1,4 +1,5 @@ import json +from typing import Optional from typing import TYPE_CHECKING import xbmc @@ -68,11 +69,11 @@ def port(self) -> int: return int(self.get_setting("network.httpproxyport")) or 0 @property - def username(self) -> str | None: + def username(self) -> Optional[str]: return self.get_setting("network.httpproxyusername") or None @property - def password(self) -> str | None: + def password(self) -> Optional[str]: return self.get_setting("network.httpproxypassword") or None @property