Last active
August 5, 2024 16:18
-
-
Save wd/149df8c79aaa1b734936c2e9108b3659 to your computer and use it in GitHub Desktop.
Could you find where is the bug?
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
from collections import defaultdict | |
import click | |
@click.group() | |
@click.pass_context | |
def cli(ctx): | |
print('cli init') | |
@cli.group() | |
@click.pass_context | |
def debian(ctx): | |
print('in debian') | |
@debian.command() | |
def list(): | |
print('list') | |
cc = defaultdict(list) | |
cc[0] | |
cli() | |
# $ python test.py debian list | |
# cli init | |
# in debian | |
# list | |
# Usage: test.py [OPTIONS] | |
# Try 'test.py --help' for help. | |
# | |
# Error: Got unexpected extra arguments (debian list) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment