Skip to content

Commit cccbcc2

Browse files
committed
Fix pre-commit
Signed-off-by: Cristian Le <cristian.le@mpsd.mpg.de>
1 parent d223274 commit cccbcc2

File tree

4 files changed

+437
-371
lines changed

4 files changed

+437
-371
lines changed

README.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,17 @@
77
[![License](https://img.shields.io/badge/License-BSD%203--Clause-blue.svg)](https://opensource.org/licenses/BSD-3-Clause)
88

99

10-
**click-option-group** is a Click-extension package that adds option groups
10+
**click-option-group** is a Click-extension package that adds option groups
1111
missing in [Click](https://github.com/pallets/click/).
1212

1313
## Aim and Motivation
1414

15-
Click is a package for creating powerful and beautiful command line interfaces (CLI) in Python,
15+
Click is a package for creating powerful and beautiful command line interfaces (CLI) in Python,
1616
but it has no the functionality for creating option groups.
1717

18-
Option groups are convenient mechanism for logical structuring CLI, also it allows you to set
19-
the specific behavior and set the relationship among grouped options (mutually exclusive options for example).
20-
Moreover, [argparse](https://docs.python.org/3/library/argparse.html) stdlib package contains this
18+
Option groups are convenient mechanism for logical structuring CLI, also it allows you to set
19+
the specific behavior and set the relationship among grouped options (mutually exclusive options for example).
20+
Moreover, [argparse](https://docs.python.org/3/library/argparse.html) stdlib package contains this
2121
functionality out of the box.
2222

2323
At the same time, many Click users need this functionality.
@@ -28,12 +28,12 @@ You can read interesting discussions about it in the following issues:
2828
* [issue 509](https://github.com/pallets/click/issues/509)
2929
* [issue 1137](https://github.com/pallets/click/issues/1137)
3030

31-
The aim of this package is to provide group options with extensible functionality
31+
The aim of this package is to provide group options with extensible functionality
3232
using canonical and clean API (Click-like API as far as possible).
3333

3434
## Quickstart
3535

36-
### Installing
36+
### Installing
3737

3838
Install and update using pip:
3939

@@ -44,7 +44,7 @@ pip install -U click-option-group
4444
### A Simple Example
4545

4646
Here is a simple example how to use option groups in your Click-based CLI.
47-
Just use `optgroup` for declaring option groups by decorating
47+
Just use `optgroup` for declaring option groups by decorating
4848
your command function in Click-like API style.
4949

5050
```python
@@ -54,13 +54,13 @@ import click
5454
from click_option_group import optgroup, RequiredMutuallyExclusiveOptionGroup
5555

5656
@click.command()
57-
@optgroup.group('Server configuration',
57+
@optgroup.group('Server configuration',
5858
help='The configuration of some server connection')
5959
@optgroup.option('-h', '--host', default='localhost', help='Server host name')
6060
@optgroup.option('-p', '--port', type=int, default=8888, help='Server port')
6161
@optgroup.option('-n', '--attempts', type=int, default=3, help='The number of connection attempts')
6262
@optgroup.option('-t', '--timeout', type=int, default=30, help='The server response timeout')
63-
@optgroup.group('Input data sources', cls=RequiredMutuallyExclusiveOptionGroup,
63+
@optgroup.group('Input data sources', cls=RequiredMutuallyExclusiveOptionGroup,
6464
help='The sources of the input data')
6565
@optgroup.option('--tsv-file', type=click.File(), help='CSV/TSV input data file')
6666
@optgroup.option('--json-file', type=click.File(), help='JSON input data file')

docs/conf.py

Lines changed: 23 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -13,17 +13,17 @@
1313
import os
1414
import sys
1515

16-
sys.path.insert(0, os.path.abspath('.'))
17-
1816
from pallets_sphinx_themes import ProjectLink
1917
from click_option_group import __version__ # noqa
2018

19+
sys.path.insert(0, os.path.abspath("."))
20+
2121

2222
# -- Project information -----------------------------------------------------
2323

24-
project = 'click-option-group'
25-
copyright = '2019-2020, Eugene Prilepin'
26-
author = 'Eugene Prilepin'
24+
project = "click-option-group"
25+
copyright = "2019-2020, Eugene Prilepin"
26+
author = "Eugene Prilepin"
2727

2828
# The full version, including alpha/beta/rc tags
2929
release = __version__
@@ -35,40 +35,43 @@
3535
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
3636
# ones.
3737
extensions = [
38-
'sphinx.ext.autodoc',
39-
'sphinx.ext.autosummary',
40-
'sphinx.ext.intersphinx',
41-
'pallets_sphinx_themes',
42-
'm2r2',
38+
"sphinx.ext.autodoc",
39+
"sphinx.ext.autosummary",
40+
"sphinx.ext.intersphinx",
41+
"pallets_sphinx_themes",
42+
"m2r2",
4343
]
4444

45-
autodoc_member_order = 'bysource'
45+
autodoc_member_order = "bysource"
4646

47-
intersphinx_mapping = {
48-
'Click': ('https://click.palletsprojects.com', None)
49-
}
47+
intersphinx_mapping = {"Click": ("https://click.palletsprojects.com", None)}
5048

5149
# Add any paths that contain templates here, relative to this directory.
52-
templates_path = ['_templates']
50+
templates_path = ["_templates"]
5351

5452
# List of patterns, relative to source directory, that match files and
5553
# directories to ignore when looking for source files.
5654
# This pattern also affects html_static_path and html_extra_path.
57-
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
55+
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"]
5856

5957

6058
# -- Options for HTML output -------------------------------------------------
6159

6260
# The theme to use for HTML and HTML Help pages. See the documentation for
6361
# a list of builtin themes.
6462
#
65-
html_theme = 'click'
63+
html_theme = "click"
6664

6765
html_context = {
6866
"project_links": [
6967
ProjectLink("PyPI releases", "https://pypi.org/project/click-option-group/"),
70-
ProjectLink("Source Code", "https://github.com/click-contrib/click-option-group/"),
71-
ProjectLink("Issue Tracker", "https://github.com/click-contrib/click-option-group/issues/"),
68+
ProjectLink(
69+
"Source Code", "https://github.com/click-contrib/click-option-group/"
70+
),
71+
ProjectLink(
72+
"Issue Tracker",
73+
"https://github.com/click-contrib/click-option-group/issues/",
74+
),
7275
]
7376
}
7477

@@ -80,4 +83,4 @@
8083
# Add any paths that contain custom static files (such as style sheets) here,
8184
# relative to this directory. They are copied after the builtin static files,
8285
# so a file named "default.css" will overwrite the builtin "default.css".
83-
html_static_path = ['_static']
86+
html_static_path = ["_static"]

tests/conftest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@
55
import pytest
66

77

8-
@pytest.fixture(scope='function')
8+
@pytest.fixture(scope="function")
99
def runner():
1010
return CliRunner()

0 commit comments

Comments
 (0)