Skip to content

Commit

Permalink
Start replacing wildcard imports
Browse files Browse the repository at this point in the history
  • Loading branch information
EliahKagan committed Mar 5, 2024
1 parent ca05904 commit ad225e2
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 8 deletions.
13 changes: 11 additions & 2 deletions git/index/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,14 @@

"""Initialize the index package."""

from .base import * # noqa: F401 F403
from .typ import * # noqa: F401 F403
__all__ = [
"BaseIndexEntry",
"BlobFilter",
"CheckoutError",
"IndexEntry",
"IndexFile",
"StageType",
]

from .base import CheckoutError, IndexFile
from .typ import BaseIndexEntry, BlobFilter, IndexEntry, StageType
5 changes: 2 additions & 3 deletions git/index/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
"""Module containing IndexFile, an Index implementation facilitating all kinds of index
manipulations such as querying and merging."""

__all__ = ("IndexFile", "CheckoutError", "StageType")

import contextlib
import datetime
import glob
Expand Down Expand Up @@ -94,9 +96,6 @@
# ------------------------------------------------------------------------------------


__all__ = ("IndexFile", "CheckoutError", "StageType")


@contextlib.contextmanager
def _named_temporary_file_for_subprocess(directory: PathLike) -> Generator[str, None, None]:
"""Create a named temporary file git subprocesses can open, deleting it afterward.
Expand Down
5 changes: 2 additions & 3 deletions git/index/typ.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,14 @@

"""Additional types used by the index."""

__all__ = ("BlobFilter", "BaseIndexEntry", "IndexEntry", "StageType")

from binascii import b2a_hex
from pathlib import Path

from .util import pack, unpack
from git.objects import Blob


# typing ----------------------------------------------------------------------

from typing import NamedTuple, Sequence, TYPE_CHECKING, Tuple, Union, cast, List
Expand All @@ -23,8 +24,6 @@

# ---------------------------------------------------------------------------------

__all__ = ("BlobFilter", "BaseIndexEntry", "IndexEntry", "StageType")

# { Invariants
CE_NAMEMASK = 0x0FFF
CE_STAGEMASK = 0x3000
Expand Down

0 comments on commit ad225e2

Please sign in to comment.