📝 update docstring

This commit is contained in:
yanyongyu 2021-02-02 12:39:23 +08:00
parent 0d8e51ff3f
commit 98b67ad829
4 changed files with 9 additions and 3 deletions

View File

@ -215,7 +215,7 @@ Rule(async_function, run_sync(sync_function))
from nonebot.rule import ArgumentParser
parser = ArgumentParser()
parser.add_argument("-a", type=bool)
parser.add_argument("-a", action="store_true")
rule = shell_command("ls", parser=parser)
```

View File

@ -53,6 +53,12 @@ class ParserExit(NoneBotException):
self.status = status
self.message = message
def __repr__(self):
return f"<ParserExit status={self.status} message={self.message}>"
def __str__(self):
return self.__repr__()
class PausedException(NoneBotException):
"""

View File

@ -326,7 +326,7 @@ def shell_command(*cmds: Union[str, Tuple[str, ...]],
from nonebot.rule import ArgumentParser
parser = ArgumentParser()
parser.add_argument("-a", type=bool)
parser.add_argument("-a", action="store_true")
rule = shell_command("ls", parser=parser)

View File

@ -4,7 +4,7 @@ from nonebot import on_shell_command
from nonebot.rule import to_me, ArgumentParser
parser = ArgumentParser()
parser.add_argument("-a", type=bool)
parser.add_argument("-a", action="store_true")
shell = on_shell_command("ls", to_me(), parser=parser)