| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent cf5cb84 commit 41d22b2
21 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -3,28 +3,27 @@ | |||
| 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,12 +32,12 @@ | |||
| 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 | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -965,7 +965,7 @@ def execute( | |||
| 965 | 965 | # Only search PATH, not CWD. This must be in the *caller* environment. The "1" can be any value. | |
| 966 | 966 | maybe_patch_caller_env = patch_env("NoDefaultCurrentDirectoryInExePath", "1") | |
| 967 | 967 | else: | |
| 968 | - cmd_not_found_exception = FileNotFoundError # NOQA # exists, flake8 unknown @UndefinedVariable | ||
| 968 | + cmd_not_found_exception = FileNotFoundError | ||
| 969 | 969 | maybe_patch_caller_env = contextlib.nullcontext() | |
| 970 | 970 | # END handle | |
| 971 | 971 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -5,20 +5,15 @@ | |||
| 5 | 5 | ||
| 6 | 6 | """Utilities to help provide compatibility with Python 3.""" | |
| 7 | 7 | ||
| 8 | - # flake8: noqa | ||
| 9 | - | ||
| 10 | 8 | import locale | |
| 11 | 9 | import os | |
| 12 | 10 | import sys | |
| 13 | 11 | ||
| 14 | - from gitdb.utils.encoding import ( | ||
| 15 | - force_bytes, # @UnusedImport | ||
| 16 | - force_text, # @UnusedImport | ||
| 17 | - ) | ||
| 12 | + from gitdb.utils.encoding import force_bytes, force_text # noqa: F401 # @UnusedImport | ||
| 18 | 13 | ||
| 19 | 14 | # typing -------------------------------------------------------------------- | |
| 20 | 15 | ||
| 21 | - from typing import ( | ||
| 16 | + from typing import ( # noqa: F401 | ||
| 22 | 17 | Any, | |
| 23 | 18 | AnyStr, | |
| 24 | 19 | Dict, | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -3,7 +3,5 @@ | |||
| 3 | 3 | ||
| 4 | 4 | """Initialize the index package.""" | |
| 5 | 5 | ||
| 6 | - # flake8: noqa | ||
| 7 | - | ||
| 8 | - from .base import * | ||
| 9 | - from .typ import * | ||
| 6 | + from .base import * # noqa: F401 F403 | ||
| 7 | + from .typ import * # noqa: F401 F403 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -3,23 +3,21 @@ | |||
| 3 | 3 | ||
| 4 | 4 | """Import all submodules' main classes into the package space.""" | |
| 5 | 5 | ||
| 6 | - # flake8: noqa | ||
| 7 | - | ||
| 8 | 6 | import inspect | |
| 9 | 7 | ||
| 10 | - from .base import * | ||
| 11 | - from .blob import * | ||
| 12 | - from .commit import * | ||
| 8 | + from .base import * # noqa: F403 | ||
| 9 | + from .blob import * # noqa: F403 | ||
| 10 | + from .commit import * # noqa: F403 | ||
| 13 | 11 | from .submodule import util as smutil | |
| 14 | - from .submodule.base import * | ||
| 15 | - from .submodule.root import * | ||
| 16 | - from .tag import * | ||
| 17 | - from .tree import * | ||
| 12 | + from .submodule.base import * # noqa: F403 | ||
| 13 | + from .submodule.root import * # noqa: F403 | ||
| 14 | + from .tag import * # noqa: F403 | ||
| 15 | + from .tree import * # noqa: F403 | ||
| 18 | 16 | ||
| 19 | 17 | # Fix import dependency - add IndexObject to the util module, so that it can be | |
| 20 | 18 | # imported by the submodule.base. | |
| 21 | - smutil.IndexObject = IndexObject # type: ignore[attr-defined] | ||
| 22 | - smutil.Object = Object # type: ignore[attr-defined] | ||
| 19 | + smutil.IndexObject = IndexObject # type: ignore[attr-defined] # noqa: F405 | ||
| 20 | + smutil.Object = Object # type: ignore[attr-defined] # noqa: F405 | ||
| 23 | 21 | del smutil | |
| 24 | 22 | ||
| 25 | 23 | # Must come after submodule was made available. | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -5,31 +5,27 @@ | |||
| 5 | 5 | ||
| 6 | 6 | """General utility functions.""" | |
| 7 | 7 | ||
| 8 | - # flake8: noqa F401 | ||
| 9 | - | ||
| 10 | - | ||
| 11 | 8 | from abc import ABC, abstractmethod | |
| 12 | - import warnings | ||
| 13 | - from git.util import IterableList, IterableObj, Actor | ||
| 14 | - | ||
| 15 | - import re | ||
| 9 | + import calendar | ||
| 16 | 10 | from collections import deque | |
| 17 | - | ||
| 11 | + from datetime import datetime, timedelta, tzinfo | ||
| 18 | 12 | from string import digits | |
| 13 | + import re | ||
| 19 | 14 | import time | |
| 20 | - import calendar | ||
| 21 | - from datetime import datetime, timedelta, tzinfo | ||
| 15 | + import warnings | ||
| 16 | + | ||
| 17 | + from git.util import IterableList, IterableObj, Actor | ||
| 22 | 18 | ||
| 23 | 19 | # typing ------------------------------------------------------------ | |
| 24 | 20 | from typing import ( | |
| 25 | 21 | Any, | |
| 26 | 22 | Callable, | |
| 27 | 23 | Deque, | |
| 28 | 24 | Iterator, | |
| 29 | - Generic, | ||
| 25 | + # Generic, | ||
| 30 | 26 | NamedTuple, | |
| 31 | 27 | overload, | |
| 32 | - Sequence, # NOQA: F401 | ||
| 28 | + Sequence, | ||
| 33 | 29 | TYPE_CHECKING, | |
| 34 | 30 | Tuple, | |
| 35 | 31 | Type, | |
@@ -38,7 +34,7 @@ | |||
| 38 | 34 | cast, | |
| 39 | 35 | ) | |
| 40 | 36 | ||
| 41 | - from git.types import Has_id_attribute, Literal, _T # NOQA: F401 | ||
| 37 | + from git.types import Has_id_attribute, Literal # , _T | ||
| 42 | 38 | ||
| 43 | 39 | if TYPE_CHECKING: | |
| 44 | 40 | from io import BytesIO, StringIO | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,13 +1,12 @@ | |||
| 1 | 1 | # This module is part of GitPython and is released under the | |
| 2 | 2 | # 3-Clause BSD License: https://opensource.org/license/bsd-3-clause/ | |
| 3 | 3 | ||
| 4 | - # flake8: noqa | ||
| 5 | 4 | # Import all modules in order, fix the names they require. | |
| 6 | 5 | ||
| 7 | - from .symbolic import * | ||
| 8 | - from .reference import * | ||
| 9 | - from .head import * | ||
| 10 | - from .tag import * | ||
| 11 | - from .remote import * | ||
| 6 | + from .symbolic import * # noqa: F401 F403 | ||
| 7 | + from .reference import * # noqa: F401 F403 | ||
| 8 | + from .head import * # noqa: F401 F403 | ||
| 9 | + from .tag import * # noqa: F401 F403 | ||
| 10 | + from .remote import * # noqa: F401 F403 | ||
| 12 | 11 | ||
| 13 | - from .log import * | ||
| 12 | + from .log import * # noqa: F401 F403 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -31,9 +31,9 @@ | |||
| 31 | 31 | from git.types import PathLike | |
| 32 | 32 | ||
| 33 | 33 | if TYPE_CHECKING: | |
| 34 | - from git.refs import SymbolicReference | ||
| 35 | 34 | from io import BytesIO | |
| 36 | - from git.config import GitConfigParser, SectionConstraint # NOQA | ||
| 35 | + from git.refs import SymbolicReference | ||
| 36 | + from git.config import GitConfigParser, SectionConstraint | ||
| 37 | 37 | ||
| 38 | 38 | # ------------------------------------------------------------------------------ | |
| 39 | 39 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -10,8 +10,8 @@ | |||
| 10 | 10 | ||
| 11 | 11 | # typing ------------------------------------------------------------------ | |
| 12 | 12 | ||
| 13 | - from typing import Any, Callable, Iterator, Type, Union, TYPE_CHECKING # NOQA | ||
| 14 | - from git.types import Commit_ish, PathLike, _T # NOQA | ||
| 13 | + from typing import Any, Callable, Iterator, Type, Union, TYPE_CHECKING | ||
| 14 | + from git.types import Commit_ish, PathLike, _T | ||
| 15 | 15 | ||
| 16 | 16 | if TYPE_CHECKING: | |
| 17 | 17 | from git.repo import Repo | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,7 +1,6 @@ | |||
| 1 | 1 | # This module is part of GitPython and is released under the | |
| 2 | 2 | # 3-Clause BSD License: https://opensource.org/license/bsd-3-clause/ | |
| 3 | 3 | ||
| 4 | - from git.types import PathLike | ||
| 5 | 4 | import os | |
| 6 | 5 | ||
| 7 | 6 | from git.compat import defenc | |
@@ -31,8 +30,8 @@ | |||
| 31 | 30 | Union, | |
| 32 | 31 | TYPE_CHECKING, | |
| 33 | 32 | cast, | |
| 34 | - ) # NOQA | ||
| 35 | - from git.types import Commit_ish, PathLike # NOQA | ||
| 33 | + ) | ||
| 34 | + from git.types import Commit_ish, PathLike | ||
| 36 | 35 | ||
| 37 | 36 | if TYPE_CHECKING: | |
| 38 | 37 | from git.repo import Repo | |
| Back | FazBrowse Home | New Git URL |
0 commit comments