Skip to content

Commit

Permalink
Testing: Don't import from click
Browse files Browse the repository at this point in the history
  • Loading branch information
smurfix committed Jan 6, 2025
1 parent 700979f commit 385b38b
Show file tree
Hide file tree
Showing 10 changed files with 18 additions and 15 deletions.
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,18 +26,21 @@ Click in three points:
## A Simple Example

```python
import click
import asyncclick as click
import anyio

@click.command()
@click.option("--count", default=1, help="Number of greetings.")
@click.option("--name", prompt="Your name", help="The person to greet.")
def hello(count, name):
async def hello(count, name):
"""Simple program that greets NAME for a total of COUNT times."""
for _ in range(count):
click.echo(f"Hello, {name}!")
await anyio.sleep(0.2)

if __name__ == '__main__':
hello()
# alternately: anyio.run(hello.main)
```

```
Expand Down
10 changes: 5 additions & 5 deletions docs/complex.rst
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ stores a mapping from subcommand names to the information for importing them.
# in lazy_group.py
import importlib
import click
import asyncclick as click
class LazyGroup(click.Group):
def __init__(self, *args, lazy_subcommands=None, **kwargs):
Expand Down Expand Up @@ -295,7 +295,7 @@ subcommands like so:
.. code-block:: python
# in main.py
import click
import asyncclick as click
from lazy_group import LazyGroup
@click.group(
Expand All @@ -307,14 +307,14 @@ subcommands like so:
pass
# in foo.py
import click
import asyncclick as click
@click.group(help="foo command for lazy example")
def cli():
pass
# in bar.py
import click
import asyncclick as click
from lazy_group import LazyGroup
@click.group(
Expand All @@ -326,7 +326,7 @@ subcommands like so:
pass
# in baz.py
import click
import asyncclick as click
@click.group(help="baz command for lazy example")
def cli():
Expand Down
2 changes: 1 addition & 1 deletion tests/typing/typing_aliased_group.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

from typing_extensions import assert_type

import click
import asyncclick as click


class AliasedGroup(click.Group):
Expand Down
2 changes: 1 addition & 1 deletion tests/typing/typing_confirmation_option.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

from typing_extensions import assert_type

import click
import asyncclick as click


@click.command()
Expand Down
2 changes: 1 addition & 1 deletion tests/typing/typing_group_kw_options.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from typing_extensions import assert_type

import click
import asyncclick as click


@click.group(context_settings={})
Expand Down
2 changes: 1 addition & 1 deletion tests/typing/typing_help_option.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from typing_extensions import assert_type

import click
import asyncclick as click


@click.command()
Expand Down
2 changes: 1 addition & 1 deletion tests/typing/typing_options.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

from typing_extensions import assert_type

import click
import asyncclick as click


@click.command()
Expand Down
2 changes: 1 addition & 1 deletion tests/typing/typing_password_option.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

from typing_extensions import assert_type

import click
import asyncclick as click


@click.command()
Expand Down
2 changes: 1 addition & 1 deletion tests/typing/typing_simple_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

from typing_extensions import assert_type

import click
import asyncclick as click


@click.command()
Expand Down
2 changes: 1 addition & 1 deletion tests/typing/typing_version_option.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

from typing_extensions import assert_type

import click
import asyncclick as click


@click.command()
Expand Down

0 comments on commit 385b38b

Please sign in to comment.