major pep8 cleanup.

funneled scope of imports where possible
fixed #59
Added fstrings where possible
added logging both temporarily and in secondary places
This commit is contained in:
Nicholas St. Germain 2018-12-17 19:12:37 -06:00
parent 47f2f61082
commit 61fcf3b80c
13 changed files with 131 additions and 121 deletions

View file

@ -1,4 +1,13 @@
from sys import version_info
from typing import NamedTuple
from logging import getLogger
logger = getLogger('temp')
# Check for python3.6 or newer to resolve erroneous typing.NamedTuple issues
if version_info < (3, 6):
logger.error('Varken requires python3.6 or newer. You are on python%s.%s - Exiting...',
version_info.major, version_info.minor)
exit(1)
class Queue(NamedTuple):
@ -89,6 +98,7 @@ class CiscoASAFirewall(NamedTuple):
verify_ssl: bool = False
get_bandwidth_run_seconds: int = 30
class OmbiRequestCounts(NamedTuple):
pending: int = 0
approved: int = 0
@ -348,6 +358,7 @@ class Movie(NamedTuple):
website: str = None
id: int = None
class OmbiMovieRequest(NamedTuple):
theMovieDbId: int = None
issueId: None = None
@ -380,6 +391,7 @@ class OmbiMovieRequest(NamedTuple):
canApprove: bool = None
id: int = None
class OmbiTVRequest(NamedTuple):
tvDbId: int = None
imdbId: str = None
@ -395,6 +407,7 @@ class OmbiTVRequest(NamedTuple):
childRequests: list = None
id: int = None
class SickChillTVShow(NamedTuple):
airdate: str = None
airs: str = None
@ -409,4 +422,4 @@ class SickChillTVShow(NamedTuple):
show_name: str = None
show_status: str = None
tvdbid: int = None
weekday: int = None
weekday: int = None