mirror of
https://github.com/EDCD/EDDN.git
synced 2025-04-25 12:42:14 +03:00
Use that bottle Plugin.apply() signature throughout
# Conflicts: # src/eddn/Gateway.py
This commit is contained in:
parent
a05e1d3d2c
commit
e9b4afcdf6
@ -11,7 +11,7 @@ import hashlib
|
|||||||
import logging
|
import logging
|
||||||
import zlib
|
import zlib
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
from typing import Dict
|
from typing import Callable, Dict
|
||||||
|
|
||||||
import gevent
|
import gevent
|
||||||
import simplejson
|
import simplejson
|
||||||
@ -352,7 +352,7 @@ class EnableCors(object):
|
|||||||
api = 2
|
api = 2
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def apply(fn, context):
|
def apply(self, fn: Callable, context: str):
|
||||||
"""
|
"""
|
||||||
Apply CORS headers to the calling bottle app.
|
Apply CORS headers to the calling bottle app.
|
||||||
|
|
||||||
|
@ -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 OrderedDict
|
from typing import Callable, OrderedDict
|
||||||
|
|
||||||
import gevent
|
import gevent
|
||||||
import mysql.connector as mariadb
|
import mysql.connector as mariadb
|
||||||
@ -285,7 +285,7 @@ class EnableCors(object):
|
|||||||
api = 2
|
api = 2
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def apply(fn, context):
|
def apply(self, fn: Callable, context: str):
|
||||||
"""
|
"""
|
||||||
Apply a CORS handler.
|
Apply a CORS handler.
|
||||||
|
|
||||||
|
@ -8,6 +8,7 @@ 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__)
|
||||||
@ -194,7 +195,7 @@ class EnableCors(object):
|
|||||||
api = 2
|
api = 2
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def apply(fn, context):
|
def apply(self, fn: Callable, context: str):
|
||||||
"""
|
"""
|
||||||
Apply a CORS handler.
|
Apply a CORS handler.
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user