Skip to content

Commit 355fa9e

Browse files
committed
Some doc fixes
1 parent cb82161 commit 355fa9e

26 files changed

Lines changed: 56 additions & 40 deletions

CHANGES.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.. currentmodule:: click
1+
.. currentmodule:: asyncclick
22

33
asyncclick 8
44
------------

docs/advanced.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Advanced Patterns
22
=================
33

4-
.. currentmodule:: click
4+
.. currentmodule:: asyncclick
55

66
In addition to common functionality that is implemented in the library
77
itself, there are countless patterns that can be implemented by extending
@@ -390,7 +390,7 @@ In some situations it's helpful to understand whether or not an option
390390
or parameter came from the command line, the environment, the default
391391
value, or :attr:`Context.default_map`. The
392392
:meth:`Context.get_parameter_source` method can be used to find this
393-
out. It will return a member of the :class:`~click.core.ParameterSource`
393+
out. It will return a member of the :class:`~asyncclick.core.ParameterSource`
394394
enum.
395395

396396
.. click:example::
@@ -447,7 +447,7 @@ Ordinarily, it would be used with the ``with`` statement:
447447
However, a ``with`` block in a group would exit and close the database
448448
before it could be used by a subcommand.
449449

450-
Instead, use the context's :meth:`~click.Context.with_resource` method
450+
Instead, use the context's :meth:`~asyncclick.Context.with_resource` method
451451
to enter the context manager and return the resource. When the group and
452452
any subcommands finish, the context's resources are cleaned up.
453453

@@ -466,12 +466,12 @@ any subcommands finish, the context's resources are cleaned up.
466466
for entry in obj.db.query(...):
467467
click.echo(entry)
468468
469-
There is also a :meth:`~click.Context.with_async_resource` method
469+
There is also a :meth:`~asyncclick.Context.with_async_resource` method
470470
if the resource must be used asynchronously.
471471

472472
If the resource isn't a context manager, usually it can be wrapped in
473473
one using something from :mod:`contextlib`. If that's not possible, use
474-
the context's :meth:`~click.Context.call_on_close` method to register a
474+
the context's :meth:`~asyncclick.Context.call_on_close` method to register a
475475
cleanup function.
476476

477477
.. code-block:: python

docs/api.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ Shell Completion
183183
See :doc:`/shell-completion` for information about enabling and
184184
customizing Click's shell completion system.
185185

186-
.. currentmodule:: click.shell_completion
186+
.. currentmodule:: asyncclick.shell_completion
187187

188188
.. autoclass:: CompletionItem
189189

@@ -197,7 +197,7 @@ customizing Click's shell completion system.
197197
Testing
198198
-------
199199

200-
.. currentmodule:: click.testing
200+
.. currentmodule:: asyncclick.testing
201201

202202
.. autoclass:: CliRunner
203203
:members:

docs/arguments.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
Arguments
44
=========
55

6-
.. currentmodule:: click
6+
.. currentmodule:: asyncclick
77

88
Arguments work similarly to :ref:`options <options>` but are positional.
99
They also only support a subset of the features of options due to their

docs/commands.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Commands and Groups
22
===================
33

4-
.. currentmodule:: click
4+
.. currentmodule:: asyncclick
55

66
The most important feature of Click is the concept of arbitrarily nesting
77
command line utilities. This is implemented through the :class:`Command`

docs/complex.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
Complex Applications
44
====================
55

6-
.. currentmodule:: click
6+
.. currentmodule:: asyncclick
77

88
Click is designed to assist with the creation of complex and simple CLI tools
99
alike. However, the power of its design is the ability to arbitrarily nest

docs/conf.py

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,17 @@
22
from pallets_sphinx_themes import get_version
33
from pallets_sphinx_themes import ProjectLink
44

5-
import click._compat
5+
import asyncclick._compat
66

77
# compat until pallets-sphinx-themes is updated
88
click._compat.text_type = str
99

1010
# Project --------------------------------------------------------------
1111

12-
project = "Click"
13-
copyright = "2014 Pallets"
12+
project = "AsyncClick"
13+
copyright = "2014 Pallets, 2019 Matthias Urlichs"
1414
author = "Pallets"
15-
release, version = get_version("Click", version_length=1)
15+
release, version = get_version("asyncclick", version_length=1)
1616

1717
# General --------------------------------------------------------------
1818

@@ -26,7 +26,7 @@
2626
"sphinx_tabs.tabs",
2727
]
2828
intersphinx_mapping = {"python": ("https://docs.python.org/3/", None)}
29-
issues_github_path = "pallets/click"
29+
issues_github_path = "python-trio/asyncclick"
3030

3131
# HTML -----------------------------------------------------------------
3232

@@ -39,6 +39,7 @@
3939
ProjectLink("PyPI releases", "https://pypi.org/project/click/"),
4040
ProjectLink("Source Code", "https://github.com/pallets/click/"),
4141
ProjectLink("Issue Tracker", "https://github.com/pallets/click/issues/"),
42+
ProjectLink("AsyncClick Fork", "https://github.com/python-trio/asyncclick/"),
4243
]
4344
}
4445
html_sidebars = {
@@ -49,9 +50,9 @@
4950
html_static_path = ["_static"]
5051
html_favicon = "_static/click-icon.png"
5152
html_logo = "_static/click-logo-sidebar.png"
52-
html_title = f"Click Documentation ({version})"
53+
html_title = f"AsyncClick Documentation ({version})"
5354
html_show_sourcelink = False
5455

5556
# LaTeX ----------------------------------------------------------------
5657

57-
latex_documents = [(master_doc, f"Click-{version}.tex", html_title, author, "manual")]
58+
latex_documents = [(master_doc, f"AsyncClick-{version}.tex", html_title, author, "manual")]

docs/documentation.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Documenting Scripts
22
===================
33

4-
.. currentmodule:: click
4+
.. currentmodule:: asyncclick
55

66
Click makes it very easy to document your command line tools. First of
77
all, it automatically generates help pages for you. While these are

docs/exceptions.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Exception Handling
22
==================
33

4-
.. currentmodule:: click
4+
.. currentmodule:: asyncclick
55

66
Click internally uses exceptions to signal various error conditions that
77
the user of the application might have caused. Primarily this is things

docs/index.rst

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,12 @@ It aims to make the process of writing command line tools quick and fun
1919
while also preventing any frustration caused by the inability to implement
2020
an intended CLI API.
2121

22-
Click in three points:
22+
AsyncClick in four points:
2323

2424
- arbitrary nesting of commands
2525
- automatic help page generation
2626
- supports lazy loading of subcommands at runtime
27+
- seamlessly use async-enabled command and subcommand handlers
2728

2829
What does it look like? Here is an example of a simple Click program:
2930

@@ -64,6 +65,16 @@ You can get the library directly from PyPI::
6465
Documentation
6566
-------------
6667

68+
.. note::
69+
70+
asyncclick closely tracks click's releases and development.
71+
In order to streamline this process, the documentation was changed
72+
as lightly as possible. Thus, the author decided not to mangle the
73+
text and did not replace ``click`` with ``asyncclick``.
74+
75+
Please adjust all ``import click`` statements to
76+
``import asyncclick as click``, or apply similar changes, as required.
77+
6778
This part of the documentation guides you through all of the library's
6879
usage patterns.
6980

0 commit comments

Comments
 (0)