Skip to content
Myr

Few typos fixed

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

authored by yelite · committed by yelite · parent 5b7b729 · Browse files · 4 files+6 added−6 removed
This commit

State

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

Diff stats

4 files+6 added−6 removed

  • other:+6 added−6 removed

4 files+6 added−6 removed

modified:docs/options.rst+1 added-1 removed
203 unmodified lines
204In such cases you need two concepts: eager parameters and a callback. An205eager parameter is a parameter that is handled before others and a206callback is what executes after the parameter is handled. The eagerness207is necessary so that an earlier required parameter does not produce an208error message. For isntance if ``--version`` was not eager and a208error message. For instance if ``--version`` was not eager and a209parameter ``--foo`` was required and defined before, you would need to210specify it for ``--version`` to work.211212A callback is a function that is invoked with two parameters: the current
119 unmodified lines
modified:docs/parameters.rst+1 added-1 removed
55 unmodified lines
56 writing.5758Custom parameter types can be implemented by subclassing59:class:`click.ParamType`. For simple cases passing a python function that60failes with a `ValueError` is also supported though discouraged.60fails with a `ValueError` is also supported though discouraged.6162Parameter Names63---------------64
44 unmodified lines
modified:docs/setuptools.rst+1 added-1 removed
4 unmodified lines
5modules that are distributed with setuptools instead of using UNIX6shebangs. There are a bunch of reasons for this.78The first one is that setuptools automatically generates executable9wrapeprs for Windows so your command line utilies work on Windows too.9wrappers for Windows so your command line utilities work on Windows too.1011The second reason is that setuptools scripts work with virtualenv on UNIX12without the virtualenv having to be activated. This is a very useful13concept which allows you to bundle your scripts with all requirements into
63 unmodified lines
modified:docs/why.rst+3 added-3 removed
2 unmodified lines
34There are so many libraries out there for writing command line utilities,5why does click exist?67This question is easy to answer: beacuse there is not a single command7This question is easy to answer: because there is not a single command8line utility for Python out there which ticks the following boxes:910* is lazily composable without restrictions11* fully follows the UNIX command line conventions
18 unmodified lines
3031Click is designed to be fun to work with and at the same time not stand in32your way. It's not overly flexible at the same time either. Currently33for instance it does not allow you to customize the help pages too much.34This is intentional because click is desigend to allow you to nest command35line utilities. The idae is that you can have a system that works34This is intentional because click is designed to allow you to nest command35line utilities. The idea is that you can have a system that works36together with another system by tacking two click instances together and37they will continue working as they should.3839Too much customizability would break this promise.
4 unmodified lines