|
3 | 3 | # This module is part of GitPython and is released under the
|
4 | 4 | # 3-Clause BSD License: https://opensource.org/license/bsd-3-clause/
|
5 | 5 |
|
6 |
| -# flake8: noqa |
7 | 6 | # @PydevCodeAnalysisIgnore
|
8 | 7 |
|
9 |
| -from git.exc import * # @NoMove @IgnorePep8 |
10 |
| -from typing import List, Optional, Sequence, Tuple, Union, TYPE_CHECKING |
11 |
| -from git.types import PathLike |
12 |
| - |
13 | 8 | __version__ = "git"
|
14 | 9 |
|
| 10 | +from typing import List, Optional, Sequence, Tuple, Union, TYPE_CHECKING |
| 11 | + |
15 | 12 | from gitdb.util import to_hex_sha
|
| 13 | +from git.exc import * # noqa: F403 # @NoMove @IgnorePep8 |
| 14 | +from git.types import PathLike |
16 | 15 |
|
17 | 16 | try:
|
18 | 17 | from git.compat import safe_decode # @NoMove @IgnorePep8
|
19 | 18 | from git.config import GitConfigParser # @NoMove @IgnorePep8
|
20 |
| - from git.objects import * # @NoMove @IgnorePep8 |
21 |
| - from git.refs import * # @NoMove @IgnorePep8 |
22 |
| - from git.diff import * # @NoMove @IgnorePep8 |
23 |
| - from git.db import * # @NoMove @IgnorePep8 |
| 19 | + from git.objects import * # noqa: F403 # @NoMove @IgnorePep8 |
| 20 | + from git.refs import * # noqa: F403 # @NoMove @IgnorePep8 |
| 21 | + from git.diff import * # noqa: F403 # @NoMove @IgnorePep8 |
| 22 | + from git.db import * # noqa: F403 # @NoMove @IgnorePep8 |
24 | 23 | from git.cmd import Git # @NoMove @IgnorePep8
|
25 | 24 | from git.repo import Repo # @NoMove @IgnorePep8
|
26 |
| - from git.remote import * # @NoMove @IgnorePep8 |
27 |
| - from git.index import * # @NoMove @IgnorePep8 |
| 25 | + from git.remote import * # noqa: F403 # @NoMove @IgnorePep8 |
| 26 | + from git.index import * # noqa: F403 # @NoMove @IgnorePep8 |
28 | 27 | from git.util import ( # @NoMove @IgnorePep8
|
29 | 28 | LockFile,
|
30 | 29 | BlockingLockFile,
|
|
33 | 32 | remove_password_if_present,
|
34 | 33 | rmtree,
|
35 | 34 | )
|
36 |
| -except GitError as _exc: |
| 35 | +except GitError as _exc: # noqa: F405 |
37 | 36 | raise ImportError("%s: %s" % (_exc.__class__.__name__, _exc)) from _exc
|
38 | 37 |
|
39 | 38 | # __all__ must be statically defined by py.typed support
|
40 | 39 | # __all__ = [name for name, obj in locals().items() if not (name.startswith("_") or inspect.ismodule(obj))]
|
41 |
| -__all__ = [ |
| 40 | +__all__ = [ # noqa: F405 |
42 | 41 | "Actor",
|
43 | 42 | "AmbiguousObjectName",
|
44 | 43 | "BadName",
|
@@ -127,7 +126,7 @@ def refresh(path: Optional[PathLike] = None) -> None:
|
127 | 126 |
|
128 | 127 | if not Git.refresh(path=path):
|
129 | 128 | return
|
130 |
| - if not FetchInfo.refresh(): |
| 129 | + if not FetchInfo.refresh(): # noqa: F405 |
131 | 130 | return # type: ignore [unreachable]
|
132 | 131 |
|
133 | 132 | GIT_OK = True
|
|
0 commit comments