flake8: minor cleanups

# Conflicts:
#	src/eddn/Gateway.py
This commit is contained in:
Athanasius committed 2022-08-18 15:18:48 +01:00
1 parent 7fe2e8880a
commit 5e51c604a4
3 files changed
+8 -7

No files matched your search

+5 -3
View File
@@ -1,3 +1,4 @@
# coding: utf8
"""
@@ -11,7 +12,7 @@ import hashlib
import logging
import zlib
from datetime import datetime
from typing import Callable, Dict
from typing import Dict
import gevent
import simplejson
@@ -353,8 +354,8 @@ def apply_cors() -> None:
"""
response.set_header(
'Access-Control-Allow-Origin',
'*'
)
'*'
)
response.set_header(
'Access-Control-Allow-Methods',
'GET, POST, PUT, OPTIONS'
@@ -364,6 +365,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()
+1 -1
View File
@@ -5,7 +5,7 @@ import collections
import datetime
import zlib
from threading import Thread
from typing import Callable, OrderedDict
from typing import OrderedDict
import gevent
import mysql.connector as mariadb
+2 -3
View File
@@ -8,7 +8,6 @@ import time
import uuid
import zlib
from threading import Thread
from typing import Callable
# Logging has to be configured first before we do anything.
logger = logging.getLogger(__name__)
@@ -26,7 +25,7 @@ logger.info('Made logger')
import gevent
import simplejson
import zmq.green as zmq
from bottle import Bottle, request, response
from bottle import Bottle, response
from gevent import monkey
from eddn.conf.Settings import Settings, load_config
@@ -109,7 +108,7 @@ class Relay(Thread):
return hashlib.sha1(f"{self.uploader_nonce!r}-{uploader.encode}".encode('utf8')).hexdigest()
def run(self) -> None: # noqa: CCR001
def run(self) -> None:
"""Handle receiving messages from Gateway and passing them on."""
# These form the connection to the Gateway daemon(s) upstream.
context = zmq.Context()