Skip to content

Commit cb82161

Browse files
committed
flake8'd and whatnot
1 parent 6e713f8 commit cb82161

29 files changed

Lines changed: 57 additions & 55 deletions

CHANGES.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
asyncclick 8
44
------------
55

6-
- Drop the __version__ attribute. Use :mod:`pkg_resouces` or
6+
- Drop the __version__ attribute. Use :mod:`pkg_resouces` or
77
:mod:`importlib.metadata` (since Python 3.8) instead.
8-
- Drop enter_context and enter_async_context. Use
8+
- Drop enter_context and enter_async_context. Use
99
``Context.with_resource``and ``Context.with_async_resource``
1010
instead.
1111
- The ``Context.close()`` method is now async and thus has been

README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ A Simple Example
4242
4343
import anyio
4444
import asyncclick as click
45-
45+
4646
@click.command()
4747
@click.option("--count", default=1, help="Number of greetings.")
4848
@click.option("--name", prompt="Your name", help="The person to greet.")

docs/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1+
import asyncclick as click
12
from pallets_sphinx_themes import get_version
23
from pallets_sphinx_themes import ProjectLink
34

4-
import asyncclick as click
55
import click._compat
66

77
# compat until pallets-sphinx-themes is updated

examples/complex/complex/commands/cmd_init.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
from complex.cli import pass_environment
2-
31
import asyncclick as click
2+
from complex.cli import pass_environment
43

54

65
@click.command("init", short_help="Initializes a repo.")

examples/complex/complex/commands/cmd_status.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
from complex.cli import pass_environment
2-
31
import asyncclick as click
2+
from complex.cli import pass_environment
43

54

65
@click.command("status", short_help="Shows file changes.")

examples/imagepipe/imagepipe.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
from functools import update_wrapper
22

3+
import asyncclick as click
34
from PIL import Image
45
from PIL import ImageEnhance
56
from PIL import ImageFilter
67

7-
import asyncclick as click
8-
98

109
@click.group(chain=True)
1110
def cli():

setup.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ classifiers =
2727
Programming Language :: Python
2828

2929
[options]
30-
packages =
30+
packages =
3131
asyncclick
3232
include_package_data = true
3333
python_requires = >= 3.6

src/click/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
from .core import MultiCommand
1414
from .core import Option
1515
from .core import Parameter
16-
from .decorators import async_backend
1716
from .decorators import argument
17+
from .decorators import async_backend
1818
from .decorators import command
1919
from .decorators import confirmation_option
2020
from .decorators import group

src/click/_termui_impl.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -341,6 +341,7 @@ def generator(self):
341341
self.finish()
342342
self.render_progress()
343343

344+
344345
def pager(generator, color=None):
345346
"""Decide what method to use for paging through text."""
346347
stdout = _default_text_stdout()

src/click/core.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
import errno
33
import os
44
import sys
5-
import anyio
65
from contextlib import asynccontextmanager
76
from contextlib import AsyncExitStack
87
from contextlib import contextmanager
@@ -11,6 +10,8 @@
1110
from inspect import iscoroutine
1211
from itertools import repeat
1312

13+
import anyio
14+
1415
from ._unicodefun import _verify_python_env
1516
from .exceptions import Abort
1617
from .exceptions import BadParameter
@@ -1067,9 +1068,10 @@ def __call__(self, *args, _anyio_backend=None, **kwargs):
10671068
main = self.main
10681069
if _anyio_backend is None:
10691070
import asyncclick
1071+
10701072
_anyio_backend = asyncclick.anyio_backend
10711073
return anyio.run(self._main, main, args, kwargs, backend=_anyio_backend)
1072-
1074+
10731075
async def _main(self, main, args, kwargs):
10741076
return await main(*args, **kwargs)
10751077

@@ -1532,6 +1534,7 @@ async def parse_args(self, ctx, args):
15321534

15331535
def invoke(self, ctx):
15341536
return self._invoke(ctx)
1537+
15351538
async def _invoke(self, ctx):
15361539
async def _process_result(value):
15371540
if self.result_callback is not None:

0 commit comments

Comments
 (0)