Monitor: flake8 and mypy pass

This commit is contained in:
Athanasius 2022-03-12 12:30:13 +00:00
parent f8dc28b256
commit 35fcbd89d9
No known key found for this signature in database
GPG Key ID: 8C392035DD80FD62

View File

@ -1,3 +1,4 @@
"""EDDN Monitor, which records stats about incoming messages."""
# coding: utf8
import argparse
@ -30,6 +31,7 @@ if Settings.RELAY_DUPLICATE_MAX_MINUTES:
def parse_cl_args():
"""Parse command-line arguments."""
parser = argparse.ArgumentParser(
prog='Gateway',
description='EDDN Gateway server',
@ -49,12 +51,13 @@ def parse_cl_args():
return parser.parse_args()
def date(__format) -> datetime.datetime:
def date(__format) -> str:
"""
Make a 'now' datetime as per the supplied format.
:param __format:
:return:
:return: String representation of 'now'
"""
d = datetime.datetime.utcnow()
return d.strftime(__format)
@ -289,6 +292,7 @@ def apply_cors() -> None:
'Origin, Accept, Content-Type, X-Requested-With, X-CSRF-Token'
)
def main() -> None:
"""Handle setting up and running the bottle app."""
cl_args = parse_cl_args()