Skip to content
Myr

Merge branch '7.x'

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by David Lord · committed by David Lord · parents 466d0ad, 3d1dcc2 · Browse files · 21 files+290 added−199 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

21 files+290 added−199 removed

  • tests:+49 added−1 removed
  • other:+241 added−198 removed

21 files+290 added−199 removed

modified:click/__init__.py-6 removed
1# -*- coding: utf-8 -*-2"""3click4~~~~~53Click is a simple Python module inspired by the stdlib optparse to make4writing command line scripts fun. Unlike other modules, it's based5around a simple API that does not come with too much magic and is6composable.1011:copyright: © 2014 by the Pallets team.12:license: BSD, see LICENSE.rst for more details.7"""89# Core classes10from .core import Context, BaseCommand, Command, MultiCommand, Group, \
81 unmodified lines
modified:click/_bashcomplete.py+46 added-9 removed
59 unmodified lines
60 fi61 done6263 if [ -n "$completions_with_descriptions" ]; then64 _describe -V unsorted completions_with_descriptions -U -Q64 _describe -V unsorted completions_with_descriptions -U65 fi6667 if [ -n "$completions" ]; then68 compadd -U -V unsorted -Q -a completions68 compadd -U -V unsorted -a completions69 fi70 compstate[insert]="automenu"71}7273compdef %(complete_func)s %(script_names)s74'''7576COMPLETION_SCRIPT_FISH = '''77complete --no-files --command %(script_names)s --arguments "(env %(autocomplete_var)s=complete_fish COMP_WORDS=(commandline -cp) COMP_CWORD=(commandline -t) %(script_names)s)"78'''7980_completion_scripts = {81 "bash": COMPLETION_SCRIPT_BASH,82 "zsh": COMPLETION_SCRIPT_ZSH,83 "fish": COMPLETION_SCRIPT_FISH,84}8586_invalid_ident_char_re = re.compile(r'[^a-zA-Z0-9_]')878889def get_completion_script(prog_name, complete_var, shell):90 cf_name = _invalid_ident_char_re.sub('', prog_name.replace('-', '_'))81 script = COMPLETION_SCRIPT_ZSH if shell == 'zsh' else COMPLETION_SCRIPT_BASH91 script = _completion_scripts.get(shell, COMPLETION_SCRIPT_BASH)92 return (script % {93 'complete_func': '_%s_completion' % cf_name,94 'script_names': prog_name,95 'autocomplete_var': complete_var,
150 unmodified lines
246 ctx = resolve_ctx(cli, prog_name, args)247 if ctx is None:248 return []249250 has_double_dash = "--" in all_args251252 # In newer versions of bash long opts with '='s are partitioned, but it's easier to parse253 # without the '='254 if start_of_option(incomplete) and WORDBREAK in incomplete:255 partition_incomplete = incomplete.partition(WORDBREAK)
2 unmodified lines
258 elif incomplete == WORDBREAK:259 incomplete = ''260261 completions = []250 if start_of_option(incomplete):262 if not has_double_dash and start_of_option(incomplete):263 # completions for partial options264 for param in ctx.command.params:265 if isinstance(param, Option) and not param.hidden:266 param_opts = [param_opt for param_opt in param.opts +
25 unmodified lines
292293 for item in get_choices(cli, prog_name, args, incomplete):294 echo(item[0])295 if include_descriptions:284 # ZSH has trouble dealing with empty array parameters when returned from commands, so use a well defined character '_' to indicate no description is present.296 # ZSH has trouble dealing with empty array parameters when297 # returned from commands, use '_' to indicate no description298 # is present.299 echo(item[1] if item[1] else '_')300301 return True302303304def do_complete_fish(cli, prog_name):305 cwords = split_arg_string(os.environ["COMP_WORDS"])306 incomplete = os.environ["COMP_CWORD"]307 args = cwords[1:]308309 for item in get_choices(cli, prog_name, args, incomplete):310 if item[1]:311 echo("%(arg)s\t%(desc)s" % {"arg": item[0], "desc": item[1]})312 else:313 echo(item[0])314315 return True316317318def bashcomplete(cli, prog_name, complete_var, complete_instr):291 if complete_instr.startswith('source'):292 shell = 'zsh' if complete_instr == 'source_zsh' else 'bash'319 if "_" in complete_instr:320 command, shell = complete_instr.split("_", 1)321 else:322 command = complete_instr323 shell = "bash"324325 if command == "source":326 echo(get_completion_script(prog_name, complete_var, shell))327 return True295 elif complete_instr == 'complete' or complete_instr == 'complete_zsh':296 return do_complete(cli, prog_name, complete_instr == 'complete_zsh')328 elif command == "complete":329 if shell == "fish":330 return do_complete_fish(cli, prog_name)331 elif shell in {"bash", "zsh"}:332 return do_complete(cli, prog_name, shell == "zsh")333334 return False
modified:click/_termui_impl.py-6 removed
1# -*- coding: utf-8 -*-2"""3click._termui_impl4~~~~~~~~~~~~~~~~~~53This module contains implementations for the termui module. To keep the4import time of Click down, some infrequently used functionality is5placed in this module and only imported as needed.910:copyright: © 2014 by the Pallets team.11:license: BSD, see LICENSE.rst for more details.6"""78import os9import sys
642 unmodified lines
modified:click/core.py+6 added
679 unmodified lines
680 context_settings = {}681 #: an optional dictionary with defaults passed to the context.682 self.context_settings = context_settings683684 def __repr__(self):685 return "<%s %s>" % (self.__class__.__name__, self.name)686687 def get_usage(self, ctx):688 raise NotImplementedError('Base commands cannot get usage')689690 def get_help(self, ctx):
769 unmodified lines
1460 self.metavar = metavar1461 self.envvar = envvar1462 self.autocompletion = autocompletion14631464 def __repr__(self):1465 return "<%s %s>" % (self.__class__.__name__, self.name)14661467 @property1468 def human_readable_name(self):1469 """Returns the human readable name of this parameter. This is the1470 same as the name for options, but the metavar for arguments.
503 unmodified lines
modified:click/parser.py+6 added-3 removed
1# -*- coding: utf-8 -*-2"""3click.parser4~~~~~~~~~~~~53This module started out as largely a copy paste from the stdlib's4optparse module with the features removed that we do not need from5optparse because we implement them in Click on a higher level (for6instance type handling, help formatting and a lot more).
3 unmodified lines
10The reason this is a different module and not optparse from the stdlib11is that there are differences in 2.x and 3.x about the error messages12generated and optparse in the stdlib uses gettext for no good reason13and might cause us issues.1415Click uses parts of optparse written by Gregory P. Ward and maintained16by the Python Software Foundation. This is limited to code in parser.py.1718Copyright 2001-2006 Gregory P. Ward. All rights reserved.19Copyright 2002-2006 Python Software Foundation. All rights reserved.20"""2122# This code uses parts of optparse written by Gregory P. Ward and23# maintained by the Python Software Foundation.
412 unmodified lines
modified:click/types.py+2 added
117 unmodified lines
118 try:119 value = value.decode(fs_enc)120 except UnicodeError:121 value = value.decode('utf-8', 'replace')122 else:123 value = value.decode('utf-8', 'replace')124 return value125 return value126127 def __repr__(self):
552 unmodified lines
modified:docs/bashcomplete.rst+92 added-60 removed
1Bash Complete2=============1Shell Completion2================34.. versionadded:: 2.056As of Click 2.0, there is built-in support for Bash completion for7any Click script. There are certain restrictions on when this completion8is available, but for the most part it should just work.6Click can provide tab completion for commands, options, and choice7values. Bash, Zsh, and Fish are supported810Limitations11-----------9Completion is only available if a script is installed and invoked10through an entry point, not through the ``python`` command. See11:ref:`setuptools-integration`.1213Bash completion is only available if a script has been installed properly,14and not executed through the ``python`` command. For information about15how to do that, see :ref:`setuptools-integration`. Click currently16only supports completion for Bash and Zsh.1314What it Completes15-----------------1621Generally, the Bash completion support will complete subcommands,17Generally, the shell completion support will complete commands,18options, and any option or argument values where the type is23:class:`click.Choice`. Subcommands and choices are always listed whereas24options are only listed if at least a dash has been provided. ::19:class:`click.Choice`. Options are only listed if at least a dash has20been entered.2122.. code-block:: text2324 $ repo <TAB><TAB>25 clone commit copy delete setuser26 $ repo clone -<TAB><TAB>27 --deep --help --rev --shallow -r2831Additionally, custom suggestions can be provided for arguments and options with32the ``autocompletion`` parameter. ``autocompletion`` should be a callback function33that returns a list of strings. This is useful when the suggestions need to be34dynamically generated at bash completion time. The callback function will be35passed 3 keyword arguments:29Custom completions can be provided for argument and option values by30providing an ``autocompletion`` function that returns a list of strings.31This is useful when the suggestions need to be dynamically generated32completion time. The callback function will be passed 3 keyword33arguments:3437- ``ctx`` - The current click context.38- ``args`` - The list of arguments passed in.39- ``incomplete`` - The partial word that is being completed, as a string. May40 be an empty string ``''`` if no characters have been entered yet.35- ``ctx`` - The current command context.36- ``args`` - The list of arguments passed in.37- ``incomplete`` - The partial word that is being completed. May38 be an empty string if no characters have been entered yet.3942Here is an example of using a callback function to generate dynamic suggestions:40Here is an example of using a callback function to generate dynamic41suggestions:4244.. click:example::43.. code-block:: python4445 import os4647 def get_env_vars(ctx, args, incomplete):
5 unmodified lines
53 click.echo('Environment variable: %s' % envvar)54 click.echo('Value: %s' % os.environ[envvar])555658Completion help strings (ZSH only)59----------------------------------57Completion help strings58-----------------------5961ZSH supports showing documentation strings for completions. These are taken62from the help parameters of options and subcommands. For dynamically generated63completions a help string can be provided by returning a tuple instead of a64string. The first element of the tuple is the completion and the second is the65help string to display.60ZSH and fish support showing documentation strings for completions.61These are taken from the help parameters of options and subcommands. For62dynamically generated completions a help string can be provided by63returning a tuple instead of a string. The first element of the tuple is64the completion and the second is the help string to display.6567Here is an example of using a callback function to generate dynamic suggestions with help strings:66Here is an example of using a callback function to generate dynamic67suggestions with help strings:6869.. click:example::69.. code-block:: python7071 import os7273 def get_colors(ctx, args, incomplete):74 colors = [('red', 'help string for the color red'),75 ('blue', 'help string for the color blue'),76 ('green', 'help string for the color green')]74 colors = [('red', 'a warm color'),75 ('blue', 'a cool color'),76 ('green', 'the other starter color')]77 return [c for c in colors if incomplete in c[0]]7879 @click.command()80 @click.argument("color", type=click.STRING, autocompletion=get_colors)
3 unmodified lines
8485Activation86----------8788In order to activate Bash completion, you need to inform Bash that89completion is available for your script, and how. Any Click application90automatically provides support for that. The general way this works is91through a magic environment variable called ``_<PROG_NAME>_COMPLETE``,92where ``<PROG_NAME>`` is your application executable name in uppercase93with dashes replaced by underscores.88In order to activate shell completion, you need to inform your shell89that completion is available for your script. Any Click application90automatically provides support for that. If the program is executed with91a special ``_<PROG_NAME>_COMPLETE`` variable, the completion mechanism92is triggered instead of the normal command. ``<PROG_NAME>`` is the93executable name in uppercase with dashes replaced by underscores.9495If your tool is called ``foo-bar``, then the magic variable is called96``_FOO_BAR_COMPLETE``. By exporting it with the ``source`` value it will97spit out the activation script which can be trivially activated.95If your tool is called ``foo-bar``, then the variable is called96``_FOO_BAR_COMPLETE``. By exporting it with the ``source_{shell}``97value it will output the activation script to evaluate.9899For instance, to enable Bash completion for your ``foo-bar`` script, this100is what you would need to put into your ``.bashrc``::99Here are examples for a ``foo-bar`` script.100102 eval "$(_FOO_BAR_COMPLETE=source foo-bar)"101For Bash, add this to ``~/.bashrc``:102104For zsh users add this to your ``.zshrc``::103.. code-block:: text104105 eval "$(_FOO_BAR_COMPLETE=source_bash foo-bar)"106107For Zsh, add this to ``~/.zshrc``:108109.. code-block:: text110111 eval "$(_FOO_BAR_COMPLETE=source_zsh foo-bar)"112108From this point onwards, your script will have autocompletion enabled.113For Fish, add this to ``~/.config/fish/completions/foo-bar.fish``:114115.. code-block:: text116117 eval (env _FOO_BAR_COMPLETE=source_fish foo-bar)118119Open a new shell to enable completion. Or run the ``eval`` command120directly in your current shell to enable it temporarily.121122123Activation Script124-----------------125113The above activation example will always invoke your application on114startup. This might be slowing down the shell activation time115significantly if you have many applications. Alternatively, you could also116ship a file with the contents of that, which is what Git and other systems117are doing.126The above ``eval`` examples will invoke your application every time a127shell is started. This may slow down shell startup time significantly.128119This can be easily accomplished::129Alternatively, export the generated completion code as a static script130to be executed. You can ship this file with your builds; tools like Git131do this. At least Zsh will also cache the results of completion files,132but not ``eval`` scripts.133121 _FOO_BAR_COMPLETE=source foo-bar > foo-bar-complete.sh134For Bash:135123For zsh:136.. code-block:: text137138 _FOO_BAR_COMPLETE=source_bash foo-bar > foo-bar-complete.sh139140For Zsh:141142.. code-block:: text143144 _FOO_BAR_COMPLETE=source_zsh foo-bar > foo-bar-complete.sh145127And then you would put this into your .bashrc or .zshrc instead::146For Fish:147148.. code-block:: text149150 _FOO_BAR_COMPLETE=source_zsh foo-bar > foo-bar-complete.sh151152In ``.bashrc`` or ``.zshrc``, source the script instead of the ``eval``153command:154155.. code-block:: text156157 . /path/to/foo-bar-complete.sh158159For Fish, add the file to the completions directory:160161.. code-block:: text162163 _FOO_BAR_COMPLETE=source_fish foo-bar > ~/.config/fish/completions/foo-bar-complete.fish
modified:docs/changelog.rst+2 added-2 removed
1Changelog2=========1Changes2=======34.. include:: ../CHANGES.rst
modified:docs/license.rst+2 added-12 removed
1License2=======1BSD-3-Clause License2====================34Click is licensed under a three-clause BSD License. It basically means:5do whatever you want with it as long as the copyright in Click sticks6around, the conditions are not modified and the disclaimer is present.7Furthermore, you must not use the names of the authors to promote derivatives8of the software without written consent.910License Text11------------124.. include:: ../LICENSE.rst14
modified:docs/options.rst+26 added-6 removed
11 unmodified lines
1213Name Your Options14-----------------1516The naming rules can be found in :ref:`parameter_names`. In short, you17can refer the option **implicitly** by the longest dash-prefixed argument:16Options have a name that will be used as the Python argument name when17calling the decorated function. This can be inferred from the option18names or given explicitly. Names are given as position arguments to the19decorator.2019.. click:example::21A name is chosen in the following order22231. If a name is not prefixed, it is used as the Python argument name24 and not treated as an option name on the command line.252. If there is at least one name prefixed with two dashes, the first26 one given is used as the name.273. The first name prefixed with one dash is used otherwise.2829To get the Python argument name, the chosen name is converted to lower30case, up to two dashes are removed as the prefix, and other dashes are31converted to underscores.3233.. code-block:: python3435 @click.command()36 @click.option('-s', '--string-to-echo')37 def echo(string_to_echo):38 click.echo(string_to_echo)3926Or, **explicitly**, by giving one non-dash-prefixed argument:40.. code-block:: python4128.. click:example::2942 @click.command()43 @click.option('-s', '--string-to-echo', 'string')44 def echo(string):45 click.echo(string)4647- ``"-f", "--foo-bar"``, the name is ``foo_bar``48- ``"-x"``, the name is ``x``49- ``"-f", "--filename", "dest"``, the name is ``dest``50- ``"--CamelCase"``, the name is ``camelcase``51- ``"-f", "-fb"``, the name is ``f``52- ``"--f", "--foo-bar"``, the name is ``f``53- ``"---f"``, the name is ``_f``5455Basic Value Options56-------------------5758The most basic option is a value option. These options accept one
790 unmodified lines
modified:docs/parameters.rst+12 added-20 removed
81 unmodified lines
8283Parameter Names84---------------8586Parameters (both options and arguments) accept a number of positional arguments87which are passed to the command function as parameters. Each string with a88single dash is added as a short argument; each string starting with a double89dash as a long one.86Parameters (both options and arguments) have a name that will be used as87the Python argument name when calling the decorated function with88values.8991If a string is added without any dashes, it becomes the internal parameter name92which is also used as variable name.90Arguments take only one positional name. To provide a different name for91use in help text, see :ref:`doc-meta-variables`.9294If all names for a parameter contain dashes, the internal name is generated95automatically by taking the longest argument and converting all dashes to96underscores.93Options can have many names that may be prefixed with one or two dashes.94Names with one dash are parsed as short options, names with two are95parsed as long options. If a name is not prefixed, it is used as the96Python argument name and not parsed as an option name. Otherwise, the97first name with a two dash prefix is used, or the first with a one dash98prefix if there are none with two. The prefix is removed and dashes are99converted to underscores to get the Python argument name.10098The internal name is converted to lowercase.101100Examples:101102* For an option with ``('-f', '--foo-bar')``, the parameter name is `foo_bar`.103* For an option with ``('-x',)``, the parameter is `x`.104* For an option with ``('-f', '--filename', 'dest')``, the parameter name is `dest`.105* For an option with ``('--CamelCaseOption',)``, the parameter is `camelcaseoption`.106* For an arguments with ``(`foogle`)``, the parameter name is `foogle`. To107 provide a different human readable name for use in help text, see the section108 about :ref:`doc-meta-variables`.109102Implementing Custom Types103-------------------------104105To implement a custom type, you need to subclass the :class:`ParamType`
37 unmodified lines
modified:tests/test_arguments.py+22 added-1 removed
1# -*- coding: utf-8 -*-2import pytest3import click4import sys4from click._compat import PY25from click._compat import PY2, text_type678def test_nargs_star(runner):9 @click.command()
74 unmodified lines
84 assert result.exit_code == 285 assert 'Got unexpected extra argument (bar)' in result.output868788def test_bytes_args(runner, monkeypatch):89 @click.command()90 @click.argument('arg')91 def from_bytes(arg):92 assert isinstance(arg, text_type), "UTF-8 encoded argument should be implicitly converted to Unicode"9394 # Simulate empty locale environment variables95 if PY2:96 monkeypatch.setattr(sys.stdin, 'encoding', 'ANSI_X3.4-1968')97 monkeypatch.setattr(sys, 'getfilesystemencoding', lambda: 'ANSI_X3.4-1968')98 monkeypatch.setattr(sys, 'getdefaultencoding', lambda: 'ascii')99 else:100 monkeypatch.setattr(sys.stdin, 'encoding', 'utf-8')101 monkeypatch.setattr(sys, 'getfilesystemencoding', lambda: 'utf-8')102 monkeypatch.setattr(sys, 'getdefaultencoding', lambda: 'utf-8')103104 runner.invoke(from_bytes, [u'Something outside of ASCII range: 林'.encode('UTF-8')],105 catch_exceptions=False)106107108def test_file_args(runner):109 @click.command()110 @click.argument('input', type=click.File('rb'))111 @click.argument('output', type=click.File('wb'))
217 unmodified lines
modified:tests/test_bashcomplete.py+27 added
1# -*- coding: utf-8 -*-23import pytest45import click6from click._bashcomplete import get_choices78
399 unmodified lines
408 assert choices_without_help(cli, [], 'h') == []409 # If the user exactly types out the hidden command, complete its subcommands.410 assert choices_without_help(cli, ['hgroup'], '') == ['hgroupsub']411 assert choices_without_help(cli, ['hsub'], '--h') == ['--hname']412413414@pytest.mark.parametrize(415 ("args", "part", "expect"),416 [417 ([], "-", ["--opt"]),418 (["value"], "--", ["--opt"]),419 ([], "-o", []),420 (["--opt"], "-o", []),421 (["--"], "", ["name", "-o", "--opt", "--"]),422 (["--"], "--o", ["--opt"]),423 ],424)425def test_args_with_double_dash_complete(args, part, expect):426 def _complete(ctx, args, incomplete):427 values = ["name", "-o", "--opt", "--"]428 return [x for x in values if x.startswith(incomplete)]429430 @click.command()431 @click.option("--opt")432 @click.argument("args", nargs=-1, autocompletion=_complete)433 def cli(opt, args):434 pass435436 assert choices_without_help(cli, args, part) == expect
modified:.azure-pipelines.yml+12 added-12 removed
1trigger:2 - master3 - "*.x"3 - '*.x'45variables:6 vmImage: ubuntu-latest7 python.version: "3.7"8 TOXENV: py,coverage-ci9 hasTestResults: true7 python.version: '3.8'8 TOXENV: py910strategy:11 matrix:13 Python 3.7 Linux:12 Python 3.8 Linux:13 vmImage: ubuntu-latest15 Python 3.7 Windows:14 Python 3.8 Windows:15 vmImage: windows-latest17 Python 3.7 Mac:16 Python 3.8 Mac:17 vmImage: macos-latest18 PyPy 3 Linux:19 python.version: pypy320 Python 3.7 Linux:21 python.version: '3.7'22 Python 3.6 Linux:22 python.version: 3.623 python.version: '3.6'24 Python 3.5 Linux:24 python.version: 3.525 python.version: '3.5'26 Python 2.7 Linux:26 python.version: 2.727 python.version: '2.7'28 Python 2.7 Windows:28 python.version: 2.729 vmImage: windows-latest30 python.version: '2.7'31 Docs:32 TOXENV: docs32 hasTestResults: false3334pool:35 vmImage: $(vmImage)36
25 unmodified lines
modified:.gitignore+11 added-14 removed
1*.pyc2*.pyo1/.idea/2/.vscode/3/env/4/venv/5__pycache__/4.idea/5.ropeproject6.DS_Store7env/8venv/6*.pyc7*.egg-info/10*.eggs/11build/12dist/13docs/_build/14.pytest_cache/15.tox/8/build/9/dist/10/.pytest_cache/11/.tox/12.coverage13.coverage.*18htmlcov/14/htmlcov/15/docs/_build/
modified:CHANGES.rst+9 added
69 unmodified lines
70 ``click.edit()``. :pr:`1469`71- Arguments to system calls such as the executable path passed to72 ``click.edit`` can contains spaces. :pr:`1470`73- Add ZSH completion autoloading and error handling. :issue:`1348`74- Add a repr to ``Command``, ``Group``, ``Option``, and ``Argument``,75 showing the name for friendlier debugging. :issue:`1267`76- Completion doesn't consider option names if a value starts with77 ``-`` after the ``--`` separator. :issue:`1247`78- ZSH completion escapes special characters in values. :pr:`1418`79- Add completion support for Fish shell. :pr:`1423`80- Decoding bytes option values falls back to UTF-8 in more cases.81 :pr:`1468`828384Version 7.085-----------8687Released 2018-09-25
539 unmodified lines
modified:MANIFEST.in+1 added-4 removed
1include CHANGES.rst2include CONTRIBUTING.rst3include LICENSE.rst4include README.rst2include tox.ini3graft artwork4graft docs5prune docs/_build6graft examples7graft tests11global-exclude *.py[co] .DS_Store8global-exclude *.pyc
modified:README.rst+8 added-15 removed
22 unmodified lines
23Install and update using `pip`_:2425.. code-block:: text2627 $ pip install click27 $ pip install -U click2829Click supports Python 3.4 and newer, Python 2.7, and PyPy.3029.. _pip: https://pip.pypa.io/en/stable/quickstart/303132A Simple Example33----------------3437What does it look like? Here is an example of a simple Click program:3835.. code-block:: python3637 import click38
8 unmodified lines
4748 if __name__ == '__main__':49 hello()5055And what it looks like when run:5651.. code-block:: text5253 $ python hello.py --count=354 Your name: Click
15 unmodified lines
7071Links72-----7380* Website: https://palletsprojects.com/p/click/81* Documentation: https://click.palletsprojects.com/82* License: `BSD <https://github.com/pallets/click/blob/master/LICENSE.rst>`_83* Releases: https://pypi.org/project/click/84* Code: https://github.com/pallets/click85* Issue tracker: https://github.com/pallets/click/issues86* Test status: https://dev.azure.com/pallets/click/_build87* Official chat: https://discord.gg/t6rrQZH74- Website: https://palletsprojects.com/p/click/75- Documentation: https://click.palletsprojects.com/76- Releases: https://pypi.org/project/click/77- Code: https://github.com/pallets/click78- Issue tracker: https://github.com/pallets/click/issues79- Test status: https://dev.azure.com/pallets/click/_build80- Official chat: https://discord.gg/t6rrQZH
modified:setup.cfg+3 added-2 removed
4 unmodified lines
5universal = 167[tool:pytest]8testpaths = tests9filterwarnings =10 error1112[coverage:run]13branch = True14source =
2 unmodified lines
1718[coverage:paths]19source =20 click19 .tox/*/lib/python*/site-packages/click20 .tox/pypy/site-packages/click21 */site-packages
modified:setup.py+1 added-8 removed
16 unmodified lines
17 "Code": "https://github.com/pallets/click",18 "Issue tracker": "https://github.com/pallets/click/issues",19 },20 license="BSD-3-Clause",21 author="Armin Ronacher",22 author_email="armin.ronacher@active-4.com",21 maintainer="Pallets",22 maintainer_email="contact@palletsprojects.com",23 description="Composable command line interface toolkit",24 long_description=readme,25 packages=["click"],26 include_package_data=True,29 python_requires=">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*",27 python_requires=">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*",28 classifiers=[29 "Development Status :: 5 - Production/Stable",30 "Intended Audience :: Developers",31 "License :: OSI Approved :: BSD License",32 "Operating System :: OS Independent",33 "Programming Language :: Python",34 "Programming Language :: Python :: 2",37 "Programming Language :: Python :: 2.7",35 "Programming Language :: Python :: 3",39 "Programming Language :: Python :: 3.4",40 "Programming Language :: Python :: 3.5",41 "Programming Language :: Python :: 3.6",42 "Programming Language :: Python :: 3.7",36 ],37)
modified:tox.ini+2 added-19 removed
1[tox]2envlist =3 py{37,36,35,27,py3,py}3 py{38,37,36,35,27,py3,py}4 docs5 coverage5skip_missing_interpreters = true67[testenv]8deps =9 pytest11 coverage10 colorama13commands = coverage run -p -m pytest --tb=short -Werror --basetemp={envtmpdir} {posargs}11commands = pytest --tb=short --basetemp={envtmpdir} {posargs}1213[testenv:docs]14deps = -r docs/requirements.txt15commands = sphinx-build -W -b html -d {envtmpdir}/doctrees docs {envtmpdir}/html1819[testenv:coverage]20deps = coverage21skip_install = true22commands =23 coverage combine24 coverage html25 coverage report2627[testenv:coverage-ci]28deps = codecov29skip_install = true30commands =31 coverage combine32 coverage xml