Skip to content

Commit 3fb2873

Browse files
committed
Add git.repo.__all__ and make submodules explicit
- No need to import Repo "as Repo". Some tools only recognize this to give the name conceptually public status when it appears in type stub files (.pyi files), and listing it in the newly created __all__ is sufficient to let humans and all tools know it has that status. - As very recently done in git.refs, this explicitly imports the submodules, so it is clear they are available and don't have to be explicitly imported. (Fundamental to the way they are used is that they will end up being imported in order to import Repo.)
1 parent 697e285 commit 3fb2873

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

git/repo/__init__.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,7 @@
33

44
"""Initialize the repo package."""
55

6-
from .base import Repo as Repo # noqa: F401
6+
__all__ = ["base", "fun", "Repo"]
7+
8+
from . import base, fun
9+
from .base import Repo

0 commit comments

Comments
 (0)