mirror of
https://github.com/nonebot/nonebot2.git
synced 2025-01-19 17:58:26 +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
|
||||
|
||||
|
||||
def on_natural_language(keywords: Union[Optional[Iterable], Callable] = None, *,
|
||||
permission: int = perm.EVERYBODY,
|
||||
def on_natural_language(keywords: Union[Optional[Iterable], Callable] = None,
|
||||
*, permission: int = perm.EVERYBODY,
|
||||
only_to_me: bool = True) -> Callable:
|
||||
"""
|
||||
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:
|
||||
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)
|
||||
return func
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user