Skip to content

Commit 2932e12

Browse files
committed
Fix mypy no implicit reexports errors
Just for the future reference used this asnwer from so https://stackoverflow.com/questions/79371127/module-does-not-explicitly-export-attribute-attr-defined
1 parent 44bac2e commit 2932e12

File tree

3 files changed

+5
-0
lines changed

3 files changed

+5
-0
lines changed

mypy.ini

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
warn_unused_configs = True
44
warn_redundant_casts = True
55
warn_unused_ignores = True
6+
no_implicit_reexport = True
67

78
[mypy-test.*]
89
disallow_untyped_defs = True

pygit2/errors.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@
2727
from ._pygit2 import GitError
2828
from .ffi import C, ffi
2929

30+
__all__ = ['GitError']
31+
3032
value_errors = set([C.GIT_EEXISTS, C.GIT_EINVALIDSPEC, C.GIT_EAMBIGUOUS])
3133

3234

pygit2/ffi.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,5 @@
2626
# Import from pygit2
2727
from ._libgit2 import ffi # noqa: F401
2828
from ._libgit2 import lib as C # type: ignore # noqa: F401
29+
30+
__all__ = ['C', 'ffi']

0 commit comments

Comments
 (0)