Created
December 12, 2021 02:40
-
-
Save GreyElaina/0172af93d1c44bbf95a66db403c6003b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @commander.command("lp user {0} permission set {1} {2}") | |
| async def user_permission_set( | |
| target: rsctx = Positional(0, selector=rsctx), | |
| permission_node: str = Positional(1, type=str), # 使用 beartype/jsondor 之类的? | |
| permission_value: bool = Positional(2, type=bool, default=True), | |
| param1: bool = AdditionParam(['-p1', '--param1'], type=bool, default=False), | |
| # 如果是 bool, 则不需要设置子匹配规则 | |
| param2: str = AdditionParam(['-p2 {0}', '--param2={0}'], type=str, default='default', | |
| return_pos=0 | |
| ), | |
| ): | |
| pass |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment