Skip to content
Myr

Merge pull request #1120 from pallets/meta

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

update metadata

authored by David Lord · committed by GitHub · parents a589835, e8bf968 · Browse files · 18 files+189 added−189 removed
This commit

State

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

Diff stats

18 files+189 added−189 removed

  • other:+189 added−189 removed

18 files+189 added−189 removed

modified:click/__init__.py+9 added-11 removed
1# -*- coding: utf-8 -*-2"""3 click4 ~~~~~3click4~~~~~56 Click is a simple Python module that wraps the stdlib's optparse to make7 writing command line scripts fun. Unlike other modules, it's based around8 a simple API that does not come with too much magic and is composable.6Click is a simple Python module inspired by the stdlib optparse to make7writing command line scripts fun. Unlike other modules, it's based8around a simple API that does not come with too much magic and is9composable.1010 In case optparse ever gets removed from the stdlib, it will be shipped by11 this module.1213 :copyright: (c) 2014 by Armin Ronacher.14 :license: BSD, see LICENSE for more details.11:copyright: © 2014 by the Pallets team.12:license: BSD, see LICENSE.rst for more details.13"""1415# Core classes16from .core import Context, BaseCommand, Command, MultiCommand, Group, \
76 unmodified lines
93# literals.94disable_unicode_literals_warning = False959699__version__ = '7.0-dev'97__version__ = '7.0.dev'
modified:click/_bashcomplete.py+6 added-2 removed
1import collections1import copy2import os3import re4
1 unmodified line
6from .parser import split_arg_string7from .core import MultiCommand, Option, Argument8from .types import Choice910try:11 from collections import abc12except ImportError:13 import collections as abc1415WORDBREAK = '='1617# Note, only BASH version 4.4 and later have the nosort option.18COMPLETION_SCRIPT_BASH = '''
143 unmodified lines
162 if current_param_values is None:163 return True164 if cmd_param.nargs == -1:165 return True162 if isinstance(current_param_values, collections.Iterable) \166 if isinstance(current_param_values, abc.Iterable) \167 and cmd_param.nargs > 1 and len(current_param_values) < cmd_param.nargs:168 return True169 return False170
123 unmodified lines
modified:click/_termui_impl.py+9 added-7 removed
1# -*- coding: utf-8 -*-2"""2 click._termui_impl3 ~~~~~~~~~~~~~~~~~~3click._termui_impl4~~~~~~~~~~~~~~~~~~55 This module contains implementations for the termui module. To keep the6 import time of Click down, some infrequently used functionality is placed7 in this module and only imported as needed.6This module contains implementations for the termui module. To keep the7import time of Click down, some infrequently used functionality is8placed in this module and only imported as needed.99 :copyright: (c) 2014 by Armin Ronacher.10 :license: BSD, see LICENSE for more details.10:copyright: © 2014 by the Pallets team.11:license: BSD, see LICENSE.rst for more details.12"""1314import os15import sys16import time17import math
604 unmodified lines
modified:click/parser.py+12 added-11 removed
1# -*- coding: utf-8 -*-2"""3 click.parser4 ~~~~~~~~~~~~3click.parser4~~~~~~~~~~~~56 This module started out as largely a copy paste from the stdlib's7 optparse module with the features removed that we do not need from8 optparse because we implement them in Click on a higher level (for9 instance type handling, help formatting and a lot more).6This module started out as largely a copy paste from the stdlib's7optparse module with the features removed that we do not need from8optparse because we implement them in Click on a higher level (for9instance type handling, help formatting and a lot more).1011 The plan is to remove more and more from here over time.11The plan is to remove more and more from here over time.1213 The reason this is a different module and not optparse from the stdlib14 is that there are differences in 2.x and 3.x about the error messages15 generated and optparse in the stdlib uses gettext for no good reason16 and might cause us issues.13The reason this is a different module and not optparse from the stdlib14is that there are differences in 2.x and 3.x about the error messages15generated and optparse in the stdlib uses gettext for no good reason16and might cause us issues.17"""1819import re20from collections import deque21from .exceptions import UsageError, NoSuchOption, BadOptionUsage, \22 BadArgumentUsage
405 unmodified lines
modified:docs/license.rst+2 added-1 removed
8 unmodified lines
910License Text11------------1213.. include:: ../LICENSE13.. include:: ../LICENSE.rst14
modified:docs/requirements.txt+1 added-1 removed
1Sphinx~=1.7.71Sphinx~=1.8.02Pallets-Sphinx-Themes~=1.1.0
modified:.appveyor.yml+3 added-3 removed
deleted:.coveragerc-3 removed
1[run]2branch = true3source = click,tests
modified:.gitignore+15 added-12 removed
1.DS_Store1*.pyc2*.pyo4*.egg-ignore5*.egg-info6.pytest_cache7dist8build9docs/_build10click.egg-info11venv/12.tox13.cache3__pycache__/4.idea/5.ropeproject15.idea6.DS_Store7env/8venv/9*.egg-info/10*.eggs/11build/12dist/13docs/_build/14.pytest_cache/15.tox/16.coverage17.coverage.*18htmlcov/
modified:.travis.yml+13 added-14 removed
1os: linux2sudo: false3language: python4python:5 - "3.6"6 - "3.5"7 - "3.4"8 - "2.7"9 - "nightly"10 - "pypy3"11 - "pypy"12env: TOXENV=py,codecov1314matrix:15 include:7 - python: 3.68 env: TOXENV=py,codecov9 - python: 3.510 env: TOXENV=py,codecov11 - python: 3.412 env: TOXENV=py,codecov13 - python: 2.714 env: TOXENV=py,codecov15 - python: pypy316 env: TOXENV=py,codecov17 - python: nightly18 env: TOXENV=py16 - env: TOXENV=docs-html17 - os: osx18 language: generic19 env: TOXENV=py3,py2,codecov20 cache:
1 unmodified line
22 directories:23 - $HOME/Library/Caches/Homebrew24 - $HOME/Library/Caches/pip25 allow_failures:28 - python: pypy326 - python: nightly27 - python: pypy328 - python: pypy29 - os: osx30 fast_finish: true3132before_install:
15 unmodified lines
4849branches:50 only:51 - master53 - /^.*-maintenance/52 - /^.*\.x$/5354notifications:55 email: false
deleted:LICENSE-38 removed
1Copyright (c) 2014 by Armin Ronacher.23Click uses parts of optparse written by Gregory P. Ward and maintained by the4Python software foundation. This is limited to code in the parser.py5module:67Copyright (c) 2001-2006 Gregory P. Ward. All rights reserved.8Copyright (c) 2002-2006 Python Software Foundation. All rights reserved.910Some rights reserved.1112Redistribution and use in source and binary forms, with or without13modification, are permitted provided that the following conditions are14met:1516 * Redistributions of source code must retain the above copyright17 notice, this list of conditions and the following disclaimer.1819 * Redistributions in binary form must reproduce the above20 copyright notice, this list of conditions and the following21 disclaimer in the documentation and/or other materials provided22 with the distribution.2324 * The names of the contributors may not be used to endorse or25 promote products derived from this software without specific26 prior written permission.2728THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS29"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT30LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR31A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT32OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,33SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT34LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,35DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY36THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT37(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE38OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
added:LICENSE.rst+39 added
1Copyright © 2014 by the Pallets team.23Some rights reserved.45Redistribution and use in source and binary forms of the software as6well as documentation, with or without modification, are permitted7provided that the following conditions are met:89- Redistributions of source code must retain the above copyright10 notice, this list of conditions and the following disclaimer.1112- Redistributions in binary form must reproduce the above copyright13 notice, this list of conditions and the following disclaimer in the14 documentation and/or other materials provided with the distribution.1516- Neither the name of the copyright holder nor the names of its17 contributors may be used to endorse or promote products derived from18 this software without specific prior written permission.1920THIS SOFTWARE AND DOCUMENTATION IS PROVIDED BY THE COPYRIGHT HOLDERS AND21CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,22BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND23FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE24COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,25INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT26NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF27USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON28ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT29(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF30THIS SOFTWARE AND DOCUMENTATION, EVEN IF ADVISED OF THE POSSIBILITY OF31SUCH DAMAGE.3233----3435Click uses parts of optparse written by Gregory P. Ward and maintained36by the Python Software Foundation. This is limited to code in parser.py.3738Copyright © 2001-2006 Gregory P. Ward. All rights reserved.39Copyright © 2002-2006 Python Software Foundation. All rights reserved.
deleted:Makefile-11 removed
1test:2 @cd tests; PYTHONPATH=.. pytest --tb=short34upload-docs:5 $(MAKE) -C docs dirhtml6 rsync -a docs/_build/dirhtml/* flow.srv.pocoo.org:/srv/websites/click.pocoo.org/static/78release:9 python setup.py sdist bdist_wheel upload1011.PHONY: upload-docs
modified:MANIFEST.in+7 added-5 removed
1include Makefile CHANGES LICENSE21include CHANGES.rst2include CONTRIBUTING.rst3include LICENSE.rst4include README.rst5include tox.ini6graft artwork4graft tests5graft examples7graft docs8prune docs/_build89graft examples10graft tests11global-exclude *.py[co] .DS_Store
modified:README.rst+17 added-17 removed
1\$ click\_2==========34Click is a Python package for creating beautiful command line interfaces5in a composable way with as little code as necessary. It's the "Command6Line Interface Creation Kit". It's highly configurable but comes with5in a composable way with as little code as necessary. It's the "Command6Line Interface Creation Kit". It's highly configurable but comes with7sensible defaults out of the box.89It aims to make the process of writing command line tools quick and fun10while also preventing any frustration caused by the inability to11implement an intended CLI API.1213Click in three points:1415- arbitrary nesting of commands16- automatic help page generation17- supports lazy loading of subcommands at runtime15- Arbitrary nesting of commands16- Automatic help page generation17- Supports lazy loading of subcommands at runtime181920Installing21----------
18 unmodified lines
4041 import click42 43 @click.command()44 @click.option('--count', default=1, help='Number of greetings.')45 @click.option('--name', prompt='Your name',46 help='The person to greet.')44 @click.option("--count", default=1, help="Number of greetings.")45 @click.option("--name", prompt="Your name",46 help="The person to greet.")47 def hello(count, name):48 """Simple program that greets NAME for a total of COUNT times."""49 for x in range(count):50 click.echo('Hello %s!' % name)49 for _ in range(count):50 click.echo("Hello, %s!" % name)51 52 if __name__ == '__main__':53 hello()54
1 unmodified line
5657.. code-block:: text5859 $ python hello.py --count=360 Your name: John61 Hello John!62 Hello John!63 Hello John!60 Your name: Click61 Hello, Click!62 Hello, Click!63 Hello, Click!646566Donate67------6869The Pallets organization develops and supports Flask and the libraries70it uses. In order to grow the community of contributors and users, and69The Pallets organization develops and supports Click and other popular70packages. In order to grow the community of contributors and users, and71allow the maintainers to devote more time to the projects, `please72donate today`_.7374.. _please donate today: https://palletsprojects.com/donate
3 unmodified lines
78-----7980* Website: https://palletsprojects.com/p/click/81* Documentation: https://click.palletsprojects.com/82* License: `BSD <https://github.com/pallets/click/blob/master/LICENSE>`_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:
5 unmodified lines
modified:setup.cfg+17 added-5 removed
1[bdist_wheel]2universal=131[metadata]5license_file = LICENSE2license_file = LICENSE.rst34[bdist_wheel]5universal = 167[tool:pytest]8addopts = -p no:warnings --tb=short8testpaths = tests910[coverage:run]11branch = True12source =13 click14 tests1516[coverage:paths]17source =18 click19 .tox/*/lib/python*/site-packages/click20 .tox/pypy/site-packages/click
modified:setup.py+31 added-44 removed
1#!/usr/bin/env python2# -*- coding: utf-8 -*-1import io2import re3from setuptools import setup478_version_re = re.compile(r'__version__\s+=\s+(.*)')91011with io.open('README.rst', 'rt', encoding='utf8') as f:5with io.open("README.rst", "rt", encoding="utf8") as f:6 readme = f.read()714with io.open('click/__init__.py', 'rt', encoding='utf8') as f:15 version = re.search(r'__version__ = \'(.*?)\'', f.read()).group(1)8with io.open("click/__init__.py", "rt", encoding="utf8") as f:9 version = re.search(r"__version__ = \'(.*?)\'", f.read()).group(1)1011setup(18 name='click',12 name="Click",13 version=version,20 url='https://palletsprojects.com/p/click/',21 author='Armin Ronacher',22 author_email='armin.ronacher@active-4.com',23 maintainer='Pallets team',24 maintainer_email='contact@palletsprojects.com',25 long_description=readme,26 packages=['click'],27 description='A simple wrapper around optparse for '28 'powerful command line utilities.',29 license='BSD',30 extras_require={31 'dev': [32 'pytest>=3',33 'coverage',34 'tox',35 'sphinx',36 ],37 'docs': [38 'sphinx',39 'Pallets-Sphinx-Themes',40 ]14 url="https://palletsprojects.com/p/click/",15 project_urls={16 "Documentation": "https://click.palletsprojects.com/",17 "Code": "https://github.com/pallets/click",18 "Issue tracker": "https://github.com/pallets/click/issues",19 },20 license="BSD",21 author="Armin Ronacher",22 author_email="armin.ronacher@active-4.com",23 maintainer="Pallets Team",24 maintainer_email="contact@palletsprojects.com",25 description="Composable command line interface toolkit",26 long_description=readme,27 packages=["click"],28 include_package_data=True,29 python_requires=">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*",30 classifiers=[43 'Development Status :: 5 - Production/Stable',44 'Intended Audience :: Developers',45 'License :: OSI Approved :: BSD License',46 'Operating System :: OS Independent',47 'Programming Language :: Python',48 'Programming Language :: Python :: 2',49 'Programming Language :: Python :: 2.7',50 'Programming Language :: Python :: 3',51 'Programming Language :: Python :: 3.4',52 'Programming Language :: Python :: 3.5',53 'Programming Language :: Python :: 3.6',54 'Programming Language :: Python :: 3.7',31 "Development Status :: 5 - Production/Stable",32 "Intended Audience :: Developers",33 "License :: OSI Approved :: BSD License",34 "Operating System :: OS Independent",35 "Programming Language :: Python",36 "Programming Language :: Python :: 2",37 "Programming Language :: Python :: 2.7",38 "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",43 ],56 python_requires=">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*",44)
modified:tox.ini+8 added-4 removed
1[tox]2envlist = py{36,35,34,27,py}2envlist =3 py{37,36,35,34,27,py3,py}4 docs-html5 coverage-report6skip_missing_interpreters = true78[testenv]9passenv = LANG10deps =11 pytest12 coverage13 colorama10commands = coverage run -p -m pytest {posargs:tests}14commands = coverage run -p -m pytest {posargs}1516[testenv:docs-html]13deps = sphinx17deps = -r docs/requirements.txt18commands = sphinx-build -W -b html -d {envtmpdir}/doctrees docs {envtmpdir}/html1920[testenv:docs-linkcheck]17deps = sphinx21deps = -r docs/requirements.txt22commands = sphinx-build -W -b linkcheck -d {envtmpdir}/doctrees docs {envtmpdir}/linkcheck2324[testenv:coverage-report]25deps = coverage
14 unmodified lines