Correct type annotations None type.

This commit is contained in:
onyx-and-iris 2023-08-02 17:19:08 +01:00
parent 7e09a0d321
commit d48e7ecd79
3 changed files with 7 additions and 7 deletions

View File

@ -1,6 +1,6 @@
[tool.poetry]
name = "vban-cmd"
version = "2.4.0"
version = "2.4.1"
description = "Python interface for the VBAN RT Packet Service (Sendtext)"
authors = ["onyx-and-iris <code@onyxandiris.online>"]
license = "MIT"

View File

@ -2,7 +2,7 @@ import logging
from abc import abstractmethod
from enum import IntEnum
from functools import cached_property
from typing import Iterable, NoReturn
from typing import Iterable
from .bus import request_bus_obj as bus
from .command import Command
@ -41,7 +41,7 @@ class FactoryBuilder:
)
self.logger = logger.getChild(self.__class__.__name__)
def _pinfo(self, name: str) -> NoReturn:
def _pinfo(self, name: str) -> None:
"""prints progress status for each step"""
name = name.split("_")[1]
self.logger.info(self._info[int(getattr(self.BuilderProgress, name))])

View File

@ -85,7 +85,7 @@ class VbanCmd(metaclass=ABCMeta):
self.login()
return self
def login(self):
def login(self) -> None:
"""Starts the subscriber and updater threads (unless in outbound mode)"""
if not self.outbound:
self.running = True
@ -154,7 +154,7 @@ class VbanCmd(metaclass=ABCMeta):
def public_packet(self):
return self._public_packet
def clear_dirty(self):
def clear_dirty(self) -> None:
while self.pdirty:
time.sleep(self.DELAY)
@ -212,11 +212,11 @@ class VbanCmd(metaclass=ABCMeta):
self.apply(config)
self.logger.info(f"Profile '{name}' applied!")
def logout(self):
def logout(self) -> None:
self.running = False
time.sleep(0.2)
[sock.close() for sock in self.socks]
self.logger.info(f"{type(self).__name__}: Successfully logged out of {self}")
def __exit__(self, exc_type, exc_value, exc_traceback):
def __exit__(self, exc_type, exc_value, exc_traceback) -> None:
self.logout()