Commit cd0d2df 1 parent 6a5f33c commit cd0d2df Copy full SHA for cd0d2df
File tree 2 files changed +32
-32
lines changed
2 files changed +32
-32
lines changed Original file line number Diff line number Diff line change 4
4
5
5
repos :
6
6
- repo : https://github.com/psf/black
7
- rev : 24.10 .0
7
+ rev : 25.1 .0
8
8
hooks :
9
9
- id : black
10
10
15
15
args : [--py38-plus]
16
16
17
17
- repo : https://github.com/PyCQA/isort
18
- rev : 5.13.2
18
+ rev : 6.0.0
19
19
hooks :
20
20
- id : isort
21
21
additional_dependencies : [toml]
Original file line number Diff line number Diff line change 8
8
# the project looks unmaintaintained.
9
9
10
10
"""
11
- click_default_group
12
- ~~~~~~~~~~~~~~~~~~~
11
+ click_default_group
12
+ ~~~~~~~~~~~~~~~~~~~
13
13
14
- Define a default subcommand by `default=True`:
14
+ Define a default subcommand by `default=True`:
15
15
16
- .. sourcecode:: python
16
+ .. sourcecode:: python
17
17
18
- import click
19
- from click_default_group import DefaultGroup
18
+ import click
19
+ from click_default_group import DefaultGroup
20
20
21
- @click.group(cls=DefaultGroup, default_if_no_args=True)
22
- def cli():
23
- pass
21
+ @click.group(cls=DefaultGroup, default_if_no_args=True)
22
+ def cli():
23
+ pass
24
24
25
- @cli.command(default=True)
26
- def foo():
27
- click.echo('foo')
25
+ @cli.command(default=True)
26
+ def foo():
27
+ click.echo('foo')
28
28
29
- @cli.command()
30
- def bar():
31
- click.echo('bar')
29
+ @cli.command()
30
+ def bar():
31
+ click.echo('bar')
32
32
33
- Then you can invoke that without explicit subcommand name:
33
+ Then you can invoke that without explicit subcommand name:
34
34
35
- .. sourcecode:: console
35
+ .. sourcecode:: console
36
36
37
- $ cli.py --help
38
- Usage: cli.py [OPTIONS] COMMAND [ARGS]...
37
+ $ cli.py --help
38
+ Usage: cli.py [OPTIONS] COMMAND [ARGS]...
39
39
40
- Options:
41
- --help Show this message and exit.
40
+ Options:
41
+ --help Show this message and exit.
42
42
43
- Command:
44
- foo*
45
- bar
43
+ Command:
44
+ foo*
45
+ bar
46
46
47
- $ cli.py
48
- foo
49
- $ cli.py foo
50
- foo
51
- $ cli.py bar
52
- bar
47
+ $ cli.py
48
+ foo
49
+ $ cli.py foo
50
+ foo
51
+ $ cli.py bar
52
+ bar
53
53
54
54
"""
55
55
import warnings
You can’t perform that action at this time.
0 commit comments