mirror of
https://github.com/nonebot/nonebot2.git
synced 2025-01-31 23:51:28 +08:00
Fix code format again
This commit is contained in:
parent
7de256d55e
commit
d4a19303b8
@ -25,8 +25,8 @@ class NLProcessor:
|
|||||||
self.only_to_me = only_to_me
|
self.only_to_me = only_to_me
|
||||||
|
|
||||||
|
|
||||||
def on_natural_language(keywords: Union[Optional[Iterable], Callable] = None, *,
|
def on_natural_language(keywords: Union[Optional[Iterable], Callable] = None,
|
||||||
permission: int = perm.EVERYBODY,
|
*, permission: int = perm.EVERYBODY,
|
||||||
only_to_me: bool = True) -> Callable:
|
only_to_me: bool = True) -> Callable:
|
||||||
"""
|
"""
|
||||||
Decorator to register a function as a natural language processor.
|
Decorator to register a function as a natural language processor.
|
||||||
@ -38,7 +38,8 @@ def on_natural_language(keywords: Union[Optional[Iterable], Callable] = None, *,
|
|||||||
|
|
||||||
def deco(func: Callable) -> Callable:
|
def deco(func: Callable) -> Callable:
|
||||||
nl_processor = NLProcessor(func=func, keywords=keywords,
|
nl_processor = NLProcessor(func=func, keywords=keywords,
|
||||||
permission=permission, only_to_me=only_to_me)
|
permission=permission,
|
||||||
|
only_to_me=only_to_me)
|
||||||
_nl_processors.add(nl_processor)
|
_nl_processors.add(nl_processor)
|
||||||
return func
|
return func
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user