Skip to content

Commit cd0d2df

Browse files
[pre-commit.ci] pre-commit autoupdate (#683)
* [pre-commit.ci] pre-commit autoupdate updates: - [github.com/psf/black: 24.10.0 → 25.1.0](psf/black@24.10.0...25.1.0) - [github.com/PyCQA/isort: 5.13.2 → 6.0.0](PyCQA/isort@5.13.2...6.0.0) * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent 6a5f33c commit cd0d2df

File tree

2 files changed

+32
-32
lines changed

2 files changed

+32
-32
lines changed

.pre-commit-config.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ ci:
44

55
repos:
66
- repo: https://github.com/psf/black
7-
rev: 24.10.0
7+
rev: 25.1.0
88
hooks:
99
- id: black
1010

@@ -15,7 +15,7 @@ repos:
1515
args: [--py38-plus]
1616

1717
- repo: https://github.com/PyCQA/isort
18-
rev: 5.13.2
18+
rev: 6.0.0
1919
hooks:
2020
- id: isort
2121
additional_dependencies: [toml]

src/towncrier/click_default_group.py

+30-30
Original file line numberDiff line numberDiff line change
@@ -8,48 +8,48 @@
88
# the project looks unmaintaintained.
99

1010
"""
11-
click_default_group
12-
~~~~~~~~~~~~~~~~~~~
11+
click_default_group
12+
~~~~~~~~~~~~~~~~~~~
1313
14-
Define a default subcommand by `default=True`:
14+
Define a default subcommand by `default=True`:
1515
16-
.. sourcecode:: python
16+
.. sourcecode:: python
1717
18-
import click
19-
from click_default_group import DefaultGroup
18+
import click
19+
from click_default_group import DefaultGroup
2020
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
2424
25-
@cli.command(default=True)
26-
def foo():
27-
click.echo('foo')
25+
@cli.command(default=True)
26+
def foo():
27+
click.echo('foo')
2828
29-
@cli.command()
30-
def bar():
31-
click.echo('bar')
29+
@cli.command()
30+
def bar():
31+
click.echo('bar')
3232
33-
Then you can invoke that without explicit subcommand name:
33+
Then you can invoke that without explicit subcommand name:
3434
35-
.. sourcecode:: console
35+
.. sourcecode:: console
3636
37-
$ cli.py --help
38-
Usage: cli.py [OPTIONS] COMMAND [ARGS]...
37+
$ cli.py --help
38+
Usage: cli.py [OPTIONS] COMMAND [ARGS]...
3939
40-
Options:
41-
--help Show this message and exit.
40+
Options:
41+
--help Show this message and exit.
4242
43-
Command:
44-
foo*
45-
bar
43+
Command:
44+
foo*
45+
bar
4646
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
5353
5454
"""
5555
import warnings

0 commit comments

Comments
 (0)