moonraker: correct stale annotations

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
This commit is contained in:
Eric Callahan 2023-02-21 20:21:01 -05:00
parent 5a504243df
commit e32fd688e4
No known key found for this signature in database
GPG Key ID: 5A1EB336DFB4C71B
3 changed files with 6 additions and 5 deletions

View File

@ -268,7 +268,8 @@ class PanelDue:
async def _process_klippy_ready(self) -> None:
# Request "info" and "configfile" status
retries = 10
printer_info = cfg_status = {}
printer_info: Dict[str, Any] = {}
cfg_status: Dict[str, Any] = {}
while retries:
try:
printer_info = await self.klippy_apis.get_klippy_info()

View File

@ -708,7 +708,7 @@ class PackageDeploy(BaseDeploy):
except shell_cmd.error:
return None
# APT Command found should be available
logging.debug(f"APT package manager detected: {ret.encode()}")
logging.debug(f"APT package manager detected: {ret}")
provider = AptCliProvider(self.cmd_helper)
try:
await provider.initialize()

View File

@ -32,12 +32,12 @@ from typing import (
Dict,
List,
Type,
TextIO
)
if TYPE_CHECKING:
from .server import Server
from .components.gpio import GpioFactory, GpioOutputPin
from .components.template import TemplateFactory
from io import TextIOWrapper
_T = TypeVar("_T")
ConfigVal = Union[None, int, float, bool, str, dict, list]
@ -468,11 +468,11 @@ class ConfigHelper:
"failed to load. In the future this will result "
"in a startup error.")
def create_backup(self):
def create_backup(self) -> None:
cfg_path = self.server.get_app_args()["config_file"]
cfg = pathlib.Path(cfg_path).expanduser().resolve()
backup = cfg.parent.joinpath(f".{cfg.name}.bkp")
backup_fp: Optional[TextIOWrapper] = None
backup_fp: Optional[TextIO] = None
try:
if backup.exists():
cfg_mtime: int = 0