Skip to content

Commit 5d21bc9

Browse files
committed
Run pre-commit hooks on all files
1 parent d128bc5 commit 5d21bc9

File tree

16 files changed

+119
-84
lines changed

16 files changed

+119
-84
lines changed

docs/examples/eggsample/eggsample/host.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
import itertools
22
import random
33

4-
import pluggy
4+
from eggsample import hookspecs
5+
from eggsample import lib
56

6-
from eggsample import hookspecs, lib
7+
import pluggy
78

89
condiments_tray = {"pickled walnuts": 13, "steak sauce": 4, "mushy peas": 2}
910

docs/examples/eggsample/setup.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
from setuptools import setup, find_packages
1+
from setuptools import find_packages
2+
from setuptools import setup
23

34
setup(
45
name="eggsample",

scripts/release.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,10 @@
55
import sys
66
from subprocess import check_call
77

8-
from colorama import init, Fore
9-
from git import Repo, Remote
8+
from colorama import Fore
9+
from colorama import init
10+
from git import Remote
11+
from git import Repo
1012

1113

1214
def create_branch(version):

src/pluggy/_callers.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,17 @@
22
Call loop machinery
33
"""
44
import sys
5-
from typing import cast, Generator, List, Mapping, Sequence, Union
5+
from typing import cast
6+
from typing import Generator
7+
from typing import List
8+
from typing import Mapping
9+
from typing import Sequence
610
from typing import TYPE_CHECKING
11+
from typing import Union
712

8-
from ._result import HookCallError, _Result, _raise_wrapfail
13+
from ._result import _raise_wrapfail
14+
from ._result import _Result
15+
from ._result import HookCallError
916

1017
if TYPE_CHECKING:
1118
from ._hooks import HookImpl

src/pluggy/_hooks.py

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -5,21 +5,19 @@
55
import sys
66
import warnings
77
from types import ModuleType
8-
from typing import (
9-
AbstractSet,
10-
Any,
11-
Callable,
12-
Generator,
13-
List,
14-
Mapping,
15-
Optional,
16-
overload,
17-
Sequence,
18-
Tuple,
19-
TypeVar,
20-
TYPE_CHECKING,
21-
Union,
22-
)
8+
from typing import AbstractSet
9+
from typing import Any
10+
from typing import Callable
11+
from typing import Generator
12+
from typing import List
13+
from typing import Mapping
14+
from typing import Optional
15+
from typing import overload
16+
from typing import Sequence
17+
from typing import Tuple
18+
from typing import TYPE_CHECKING
19+
from typing import TypeVar
20+
from typing import Union
2321

2422
from ._result import _Result
2523

src/pluggy/_manager.py

Lines changed: 23 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -2,36 +2,32 @@
22
import sys
33
import types
44
import warnings
5-
from typing import (
6-
Any,
7-
Callable,
8-
cast,
9-
Dict,
10-
Iterable,
11-
List,
12-
Mapping,
13-
Optional,
14-
Sequence,
15-
Set,
16-
Tuple,
17-
TYPE_CHECKING,
18-
Union,
19-
)
5+
from typing import Any
6+
from typing import Callable
7+
from typing import cast
8+
from typing import Dict
9+
from typing import Iterable
10+
from typing import List
11+
from typing import Mapping
12+
from typing import Optional
13+
from typing import Sequence
14+
from typing import Set
15+
from typing import Tuple
16+
from typing import TYPE_CHECKING
17+
from typing import Union
2018

2119
from . import _tracing
22-
from ._result import _Result
2320
from ._callers import _multicall
24-
from ._hooks import (
25-
HookImpl,
26-
HookSpec,
27-
_HookCaller,
28-
_SubsetHookCaller,
29-
_HookImplFunction,
30-
_HookRelay,
31-
_Namespace,
32-
normalize_hookimpl_opts,
33-
_Plugin,
34-
)
21+
from ._hooks import _HookCaller
22+
from ._hooks import _HookImplFunction
23+
from ._hooks import _HookRelay
24+
from ._hooks import _Namespace
25+
from ._hooks import _Plugin
26+
from ._hooks import _SubsetHookCaller
27+
from ._hooks import HookImpl
28+
from ._hooks import HookSpec
29+
from ._hooks import normalize_hookimpl_opts
30+
from ._result import _Result
3531

3632
if sys.version_info >= (3, 8):
3733
from importlib import metadata as importlib_metadata

src/pluggy/_result.py

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,15 @@
33
"""
44
import sys
55
from types import TracebackType
6-
from typing import (
7-
Callable,
8-
cast,
9-
Generator,
10-
Generic,
11-
Optional,
12-
Tuple,
13-
Type,
14-
TYPE_CHECKING,
15-
TypeVar,
16-
)
6+
from typing import Callable
7+
from typing import cast
8+
from typing import Generator
9+
from typing import Generic
10+
from typing import Optional
11+
from typing import Tuple
12+
from typing import Type
13+
from typing import TYPE_CHECKING
14+
from typing import TypeVar
1715

1816
if TYPE_CHECKING:
1917
from typing import NoReturn

testing/benchmark.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,12 @@
22
Benchmarking and performance tests.
33
"""
44
import pytest
5-
from pluggy import HookspecMarker, HookimplMarker, PluginManager
6-
from pluggy._hooks import HookImpl
5+
6+
from pluggy import HookimplMarker
7+
from pluggy import HookspecMarker
8+
from pluggy import PluginManager
79
from pluggy._callers import _multicall
10+
from pluggy._hooks import HookImpl
811

912

1013
hookspec = HookspecMarker("example")

testing/conftest.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
import pytest
2-
from pluggy import HookspecMarker, PluginManager
2+
3+
from pluggy import HookspecMarker
4+
from pluggy import PluginManager
35

46

57
@pytest.fixture(

testing/test_details.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
import pytest
2-
from pluggy import PluginManager, HookimplMarker, HookspecMarker
2+
3+
from pluggy import HookimplMarker
4+
from pluggy import HookspecMarker
5+
from pluggy import PluginManager
36

47
hookspec = HookspecMarker("example")
58
hookimpl = HookimplMarker("example")

0 commit comments

Comments
 (0)