Skip to content

Commit

Permalink
Merge branch 'pallets:main' into shell-completion-option-values
Browse files Browse the repository at this point in the history
  • Loading branch information
spanglerco committed Jan 24, 2022
2 parents c2956ec + 49164fa commit 9944ebf
Show file tree
Hide file tree
Showing 22 changed files with 120 additions and 155 deletions.
2 changes: 1 addition & 1 deletion .github/dependabot.yml
Expand Up @@ -2,7 +2,7 @@ version: 2
updates:
- package-ecosystem: "pip"
directory: "/requirements"
target-branch: "3.0.x"
target-branch: "8.0.x"
versioning-strategy: "lockfile-only"
schedule:
interval: "monthly"
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/tests.yaml
Expand Up @@ -31,7 +31,6 @@ jobs:
- {name: '3.9', python: '3.9', os: ubuntu-latest, tox: py39}
- {name: '3.8', python: '3.8', os: ubuntu-latest, tox: py38}
- {name: '3.7', python: '3.7', os: ubuntu-latest, tox: py37}
- {name: '3.6', python: '3.6', os: ubuntu-latest, tox: py36}
- {name: 'PyPy', python: 'pypy-3.7', os: ubuntu-latest, tox: pypy37}
- {name: Typing, python: '3.10', os: ubuntu-latest, tox: typing}
steps:
Expand Down
1 change: 1 addition & 0 deletions .gitignore
@@ -1,5 +1,6 @@
/.idea/
/.vscode/
.DS_Store/
/env/
/venv/
__pycache__/
Expand Down
5 changes: 3 additions & 2 deletions .pre-commit-config.yaml
@@ -1,11 +1,12 @@
ci:
autoupdate_branch: "8.0.x"
autoupdate_schedule: monthly
repos:
- repo: https://github.com/asottile/pyupgrade
rev: v2.29.1
rev: v2.31.0
hooks:
- id: pyupgrade
args: ["--py36-plus"]
args: ["--py37-plus"]
- repo: https://github.com/asottile/reorder_python_imports
rev: v2.6.0
hooks:
Expand Down
19 changes: 19 additions & 0 deletions CHANGES.rst
@@ -1,5 +1,24 @@
.. currentmodule:: click

Version 8.1.0
-------------

Unreleased

- Drop support for Python 3.6. :pr:`2129`
- Remove previously deprecated code. :pr:`2130`

- ``Group.resultcallback`` is renamed to ``result_callback``.
- ``autocompletion`` parameter to ``Command`` is renamed to
``shell_complete``.
- ``get_terminal_size`` is removed, use
``shutil.get_terminal_size`` instead.
- ``get_os_args`` is removed, use ``sys.argv[1:]`` instead.

- Single options boolean flags with ``show_default=True`` only show
the default if it is ``True``. :issue:`1971`


Version 8.0.4
-------------

Expand Down
Binary file removed docs/.DS_Store
Binary file not shown.
2 changes: 0 additions & 2 deletions docs/api.rst
Expand Up @@ -63,8 +63,6 @@ Utilities

.. autofunction:: pause

.. autofunction:: get_terminal_size

.. autofunction:: get_binary_stream

.. autofunction:: get_text_stream
Expand Down
21 changes: 21 additions & 0 deletions docs/options.rst
Expand Up @@ -109,6 +109,27 @@ To show the default values when showing command help, use ``show_default=True``
invoke(dots, args=['--help'])

For single option boolean flags, the default remains hidden if the default
value is False.

.. click:example::
@click.command()
@click.option('--n', default=1, show_default=True)
@click.option("--gr", is_flag=True, show_default=True, default=False, help="Greet the world.")
@click.option("--br", is_flag=True, show_default=True, default=True, help="Add a thematic break")
def dots(n, gr, br):
if gr:
click.echo('Hello world!')
click.echo('.' * n)
if br:
click.echo('-' * n)

.. click:run::
invoke(dots, args=['--help'])


Multi Value Options
-------------------

Expand Down
2 changes: 1 addition & 1 deletion examples/README
Expand Up @@ -9,4 +9,4 @@ Click Examples
through the wrong interpreter.

For more information about this see the documentation:
https://click.palletsprojects.com/en/7.x/setuptools/
https://click.palletsprojects.com/setuptools/
22 changes: 10 additions & 12 deletions requirements/dev.txt
Expand Up @@ -6,17 +6,15 @@
#
alabaster==0.7.12
# via sphinx
attrs==21.2.0
attrs==21.4.0
# via pytest
babel==2.9.1
# via sphinx
backports.entry-points-selectable==1.1.1
# via virtualenv
certifi==2021.10.8
# via requests
cfgv==3.3.1
# via pre-commit
charset-normalizer==2.0.9
charset-normalizer==2.0.10
# via requests
click==8.0.3
# via pip-tools
Expand All @@ -30,7 +28,7 @@ filelock==3.4.2
# via
# tox
# virtualenv
identify==2.4.0
identify==2.4.3
# via pre-commit
idna==3.3
# via requests
Expand All @@ -42,7 +40,7 @@ jinja2==3.0.3
# via sphinx
markupsafe==2.0.1
# via jinja2
mypy==0.930
mypy==0.931
# via -r requirements/typing.in
mypy-extensions==0.4.3
# via mypy
Expand Down Expand Up @@ -72,7 +70,7 @@ py==1.11.0
# via
# pytest
# tox
pygments==2.10.0
pygments==2.11.2
# via
# sphinx
# sphinx-tabs
Expand All @@ -84,7 +82,7 @@ pytz==2021.3
# via babel
pyyaml==6.0
# via pre-commit
requests==2.26.0
requests==2.27.1
# via sphinx
six==1.16.0
# via
Expand All @@ -99,7 +97,7 @@ sphinx==4.3.2
# sphinx-issues
# sphinx-tabs
# sphinxcontrib-log-cabinet
sphinx-issues==1.2.0
sphinx-issues==3.0.1
# via -r requirements/docs.in
sphinx-tabs==3.2.0
# via -r requirements/docs.in
Expand All @@ -126,13 +124,13 @@ tomli==2.0.0
# via
# mypy
# pep517
tox==3.24.4
tox==3.24.5
# via -r requirements/dev.in
typing-extensions==4.0.1
# via mypy
urllib3==1.26.7
urllib3==1.26.8
# via requests
virtualenv==20.10.0
virtualenv==20.13.0
# via
# pre-commit
# tox
Expand Down
10 changes: 5 additions & 5 deletions requirements/docs.txt
Expand Up @@ -10,7 +10,7 @@ babel==2.9.1
# via sphinx
certifi==2021.10.8
# via requests
charset-normalizer==2.0.9
charset-normalizer==2.0.10
# via requests
docutils==0.16
# via
Expand All @@ -30,15 +30,15 @@ packaging==21.3
# sphinx
pallets-sphinx-themes==2.0.2
# via -r requirements/docs.in
pygments==2.10.0
pygments==2.11.2
# via
# sphinx
# sphinx-tabs
pyparsing==3.0.6
# via packaging
pytz==2021.3
# via babel
requests==2.26.0
requests==2.27.1
# via sphinx
snowballstemmer==2.2.0
# via sphinx
Expand All @@ -49,7 +49,7 @@ sphinx==4.3.2
# sphinx-issues
# sphinx-tabs
# sphinxcontrib-log-cabinet
sphinx-issues==1.2.0
sphinx-issues==3.0.1
# via -r requirements/docs.in
sphinx-tabs==3.2.0
# via -r requirements/docs.in
Expand All @@ -67,7 +67,7 @@ sphinxcontrib-qthelp==1.0.3
# via sphinx
sphinxcontrib-serializinghtml==1.1.5
# via sphinx
urllib3==1.26.7
urllib3==1.26.8
# via requests

# The following packages are considered to be unsafe in a requirements file:
Expand Down
2 changes: 1 addition & 1 deletion requirements/tests.txt
Expand Up @@ -4,7 +4,7 @@
#
# pip-compile requirements/tests.in
#
attrs==21.2.0
attrs==21.4.0
# via pytest
iniconfig==1.1.1
# via pytest
Expand Down
2 changes: 1 addition & 1 deletion requirements/typing.txt
Expand Up @@ -4,7 +4,7 @@
#
# pip-compile requirements/typing.in
#
mypy==0.930
mypy==0.931
# via -r requirements/typing.in
mypy-extensions==0.4.3
# via mypy
Expand Down
14 changes: 7 additions & 7 deletions setup.cfg
Expand Up @@ -29,8 +29,8 @@ classifiers =
[options]
packages = find:
package_dir = = src
include_package_data = true
python_requires = >= 3.6
include_package_data = True
python_requires = >= 3.7
# Dependencies are in setup.py for GitHub's dependency graph.

[options.packages.find]
Expand All @@ -42,22 +42,22 @@ filterwarnings =
error

[coverage:run]
branch = true
branch = True
source =
click
tests

[coverage:paths]
source =
click
src
*/site-packages

[flake8]
# B = bugbear
# E = pycodestyle errors
# F = flake8 pyflakes
# W = pycodestyle warnings
# B9 = bugbear opinions,
# B9 = bugbear opinions
# ISC = implicit str concat
select = B, E, F, W, B9, ISC
ignore =
Expand All @@ -72,12 +72,12 @@ ignore =
# up to 88 allowed by bugbear B950
max-line-length = 80
per-file-ignores =
# __init__ module exports names
# __init__ exports names
src/click/__init__.py: F401

[mypy]
files = src/click
python_version = 3.6
python_version = 3.7
show_error_codes = True
disallow_subclassing_any = True
disallow_untyped_calls = True
Expand Down
4 changes: 1 addition & 3 deletions src/click/__init__.py
Expand Up @@ -41,7 +41,6 @@
from .termui import confirm as confirm
from .termui import echo_via_pager as echo_via_pager
from .termui import edit as edit
from .termui import get_terminal_size as get_terminal_size
from .termui import getchar as getchar
from .termui import launch as launch
from .termui import pause as pause
Expand All @@ -68,8 +67,7 @@
from .utils import format_filename as format_filename
from .utils import get_app_dir as get_app_dir
from .utils import get_binary_stream as get_binary_stream
from .utils import get_os_args as get_os_args
from .utils import get_text_stream as get_text_stream
from .utils import open_file as open_file

__version__ = "8.0.3"
__version__ = "8.1.0.dev0"

0 comments on commit 9944ebf

Please sign in to comment.