Skip to content
Myr

Docs: fixed spelling mistakes

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

authored by Julen Ruiz Aizpuru · committed by Julen Ruiz Aizpuru · parent 7caa40d · Browse files · 2 files+4 added−4 removed
This commit

State

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

Trailers

  • Possesive: it's -> its

Diff stats

2 files+4 added−4 removed

  • other:+4 added−4 removed

2 files+4 added−4 removed

modified:docs/commands.rst+1 added-1 removed
87 unmodified lines
88 if __name__ == '__main__':89 cli(obj={})9091If the object is provided each context will pass the object onwards to92it's children, but at any level a context's object can be overridden. To92its children, but at any level a context's object can be overridden. To93reach to a parent ``context.parent`` can be used.9495In addition to that instead of passing an object down nothing stops the96application from modifying global state. For instance you could just flip
112 unmodified lines
modified:docs/complex.rst+3 added-3 removed
4 unmodified lines
56.. currentmodule:: click78Click is designed to write complex and simple CLI tools alike. However9the power of it's design is the ability to arbitrarily nest systems9the power of its design is the ability to arbitrarily nest systems10together. For instance in case you have ever used Django you will have11realized that it provides a command line utility. But so does Celery for12instance. So when using Celery with Django there are two tools that need13to interact with each other and be cross configured.
19 unmodified lines
33an application defined object optionally.3435Context objects build a linked list until they hit top one. Each context36is linked to the parent context. This allows a command to work below37another command and store it's own information there without having to be37another command and store its own information there without having to be38afraid of messing up the state of the parent command.3940Because the parent data is however available it's possible to navigate to41it if needed.
97 unmodified lines
139140While not relevant for this particular program we want to build there is141also quite good support for interleaving systems. Imagine for instance142there would be this super cool plugin for our version control system that143needs a lot of configuration and wants to store it's own configuration as143needs a lot of configuration and wants to store its own configuration as144:attr:`~Context.obj`. If we would then attach another command below that,145all the sudden we would get the plugin config instead of our repo object.146147One obvious way is to store a reference to the repo on the plugin but then
23 unmodified lines