mirror of
https://github.com/EDCD/EDDN.git
synced 2025-04-21 19:17:38 +03:00
Bouncer: Trying out 'Callable' for bottle plugin.apply() type annotation
This commit is contained in:
parent
1f420a8f3e
commit
485055357b
@ -30,6 +30,7 @@ import argparse
|
||||
import logging
|
||||
import zlib
|
||||
from datetime import datetime
|
||||
from typing import Callable
|
||||
|
||||
import gevent
|
||||
import requests
|
||||
@ -257,7 +258,7 @@ class EnableCors(object):
|
||||
name = 'enable_cors'
|
||||
api = 2
|
||||
|
||||
def apply(self, fn, context):
|
||||
def apply(self, fn: Callable, context: str):
|
||||
"""
|
||||
Apply CORS headers to the calling bottle app.
|
||||
|
||||
@ -285,7 +286,7 @@ class CustomLogging(object):
|
||||
name = 'custom_logging'
|
||||
api = 2
|
||||
|
||||
def apply(self, fn, context):
|
||||
def apply(self, fn: Callable, context: str):
|
||||
"""
|
||||
Apply custom logging to bottle request.
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user