|
24 | 24 | # Boston, MA 02110-1301, USA. |
25 | 25 |
|
26 | 26 | # Standard Library |
27 | | -import functools |
| 27 | +import functools # noqa: I001 |
28 | 28 | from os import PathLike |
29 | 29 | import typing |
30 | 30 |
|
31 | 31 | # Low level API |
32 | | -from ._pygit2 import * |
| 32 | +from ._pygit2 import * # noqa: F403 |
33 | 33 | from ._pygit2 import _cache_enums |
34 | 34 |
|
35 | 35 | # High level API |
36 | 36 | from . import enums |
37 | | -from ._build import __version__ |
38 | | -from .blame import Blame, BlameHunk |
39 | | -from .blob import BlobIO |
40 | | -from .callbacks import Payload, RemoteCallbacks, CheckoutCallbacks, StashApplyCallbacks |
41 | | -from .callbacks import git_clone_options, git_fetch_options, get_credentials |
42 | | -from .config import Config |
43 | | -from .credentials import * |
44 | | -from .errors import check_error, Passthrough |
| 37 | +from ._build import __version__ # noqa: F401 |
| 38 | +from .blame import Blame, BlameHunk # noqa: F401 |
| 39 | +from .blob import BlobIO # noqa: F401 |
| 40 | +from .callbacks import Payload, RemoteCallbacks, CheckoutCallbacks, StashApplyCallbacks # noqa: F401 |
| 41 | +from .callbacks import git_clone_options, git_fetch_options, get_credentials # noqa: F401 |
| 42 | +from .config import Config # noqa: F401 |
| 43 | +from .credentials import * # noqa: F403 |
| 44 | +from .errors import check_error, Passthrough # noqa: F401 |
45 | 45 | from .ffi import ffi, C |
46 | | -from .filter import Filter |
47 | | -from .index import Index, IndexEntry |
48 | | -from .legacyenums import * |
49 | | -from .packbuilder import PackBuilder |
50 | | -from .remotes import Remote |
| 46 | +from .filter import Filter # noqa: F401 |
| 47 | +from .index import Index, IndexEntry # noqa: F401 |
| 48 | +from .legacyenums import * # noqa: F403 |
| 49 | +from .packbuilder import PackBuilder # noqa: F401 |
| 50 | +from .remotes import Remote # noqa: F401 |
51 | 51 | from .repository import Repository |
52 | 52 | from .settings import Settings |
53 | | -from .submodules import Submodule |
| 53 | +from .submodules import Submodule # noqa: F401 |
54 | 54 | from .utils import to_bytes, to_str |
55 | 55 |
|
56 | 56 |
|
57 | 57 | # Features |
58 | 58 | features = enums.Feature(C.git_libgit2_features()) |
59 | 59 |
|
60 | 60 | # libgit version tuple |
61 | | -LIBGIT2_VER = (LIBGIT2_VER_MAJOR, LIBGIT2_VER_MINOR, LIBGIT2_VER_REVISION) |
| 61 | +LIBGIT2_VER = (LIBGIT2_VER_MAJOR, LIBGIT2_VER_MINOR, LIBGIT2_VER_REVISION) # noqa: F405 |
62 | 62 |
|
63 | 63 | # Let _pygit2 cache references to Python enum types. |
64 | 64 | # This is separate from PyInit__pygit2() to avoid a circular import. |
65 | 65 | _cache_enums() |
66 | 66 |
|
67 | 67 |
|
68 | | -def init_repository( |
| 68 | +def init_repository( # noqa: PLR0913 |
69 | 69 | path: typing.Union[str, bytes, PathLike, None], |
70 | 70 | bare: bool = False, |
71 | 71 | flags: enums.RepositoryInitFlag = enums.RepositoryInitFlag.MKPATH, |
@@ -143,7 +143,7 @@ def init_repository( |
143 | 143 | return Repository(to_str(path)) |
144 | 144 |
|
145 | 145 |
|
146 | | -def clone_repository( |
| 146 | +def clone_repository( # noqa: PLR0913 |
147 | 147 | url, |
148 | 148 | path, |
149 | 149 | bare=False, |
@@ -220,6 +220,6 @@ def clone_repository( |
220 | 220 | return Repository._from_c(crepo[0], owned=True) |
221 | 221 |
|
222 | 222 |
|
223 | | -tree_entry_key = functools.cmp_to_key(tree_entry_cmp) |
| 223 | +tree_entry_key = functools.cmp_to_key(tree_entry_cmp) # noqa: F405 |
224 | 224 |
|
225 | 225 | settings = Settings() |
0 commit comments