mirror of
https://github.com/EDCD/EDDN.git
synced 2025-06-17 15:51:01 +03:00
flake8: minor cleanups
# Conflicts: # src/eddn/Gateway.py
This commit is contained in:
parent
7fe2e8880a
commit
5e51c604a4
@ -1,3 +1,4 @@
|
|||||||
|
|
||||||
# coding: utf8
|
# coding: utf8
|
||||||
|
|
||||||
"""
|
"""
|
||||||
@ -11,7 +12,7 @@ import hashlib
|
|||||||
import logging
|
import logging
|
||||||
import zlib
|
import zlib
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
from typing import Callable, Dict
|
from typing import Dict
|
||||||
|
|
||||||
import gevent
|
import gevent
|
||||||
import simplejson
|
import simplejson
|
||||||
@ -364,6 +365,7 @@ def apply_cors() -> None:
|
|||||||
'Origin, Accept, Content-Type, X-Requested-With, X-CSRF-Token'
|
'Origin, Accept, Content-Type, X-Requested-With, X-CSRF-Token'
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
def main() -> None:
|
def main() -> None:
|
||||||
"""Handle setting up and running the bottle app."""
|
"""Handle setting up and running the bottle app."""
|
||||||
cl_args = parse_cl_args()
|
cl_args = parse_cl_args()
|
||||||
|
@ -5,7 +5,7 @@ import collections
|
|||||||
import datetime
|
import datetime
|
||||||
import zlib
|
import zlib
|
||||||
from threading import Thread
|
from threading import Thread
|
||||||
from typing import Callable, OrderedDict
|
from typing import OrderedDict
|
||||||
|
|
||||||
import gevent
|
import gevent
|
||||||
import mysql.connector as mariadb
|
import mysql.connector as mariadb
|
||||||
|
@ -8,7 +8,6 @@ import time
|
|||||||
import uuid
|
import uuid
|
||||||
import zlib
|
import zlib
|
||||||
from threading import Thread
|
from threading import Thread
|
||||||
from typing import Callable
|
|
||||||
|
|
||||||
# Logging has to be configured first before we do anything.
|
# Logging has to be configured first before we do anything.
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
||||||
@ -26,7 +25,7 @@ logger.info('Made logger')
|
|||||||
import gevent
|
import gevent
|
||||||
import simplejson
|
import simplejson
|
||||||
import zmq.green as zmq
|
import zmq.green as zmq
|
||||||
from bottle import Bottle, request, response
|
from bottle import Bottle, response
|
||||||
from gevent import monkey
|
from gevent import monkey
|
||||||
|
|
||||||
from eddn.conf.Settings import Settings, load_config
|
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()
|
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."""
|
"""Handle receiving messages from Gateway and passing them on."""
|
||||||
# These form the connection to the Gateway daemon(s) upstream.
|
# These form the connection to the Gateway daemon(s) upstream.
|
||||||
context = zmq.Context()
|
context = zmq.Context()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user