Skip to content

Commit fde40cd

Browse files
committed
More elegantly get rid of F401 (module imported by unused) errors in the public API
1 parent de8f649 commit fde40cd

File tree

7 files changed

+23
-7
lines changed

7 files changed

+23
-7
lines changed

datastore/abc.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,16 @@
1+
__all__ = (
2+
"BinaryDatastore",
3+
"ObjectDatastore",
4+
5+
"BinaryAdapter",
6+
"ObjectAdapter",
7+
8+
"ReceiveChannel",
9+
"ReceiveStream",
10+
11+
"Serializer",
12+
)
13+
114
from .core.binarystore import Datastore as BinaryDatastore
215
from .core.objectstore import Datastore as ObjectDatastore
316

datastore/filesystem/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,6 @@
33
__author__ = "Juan Batiz-Benet, Alexander Schlarb"
44
__email__ = "juan@benet.ai, alexander@ninetailed.ninja"
55

6+
__all__ = ("FileSystemDatastore",)
7+
68
from .filesystem import FileSystemDatastore

datastore/serializer/json.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33

44
import datastore.abc
55

6+
__all__ = ("Serializer", "PrettySerializer")
7+
68
T_co = typing.TypeVar("T_co", covariant=True)
79

810

datastore/serializer/pickle.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33

44
import datastore.abc
55

6+
__all__ = ("Serializer",)
7+
68
T_co = typing.TypeVar("T_co", covariant=True)
79

810

datastore/typing.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
1+
__all__ = ("ArbitraryReceiveChannel", "ArbitraryReceiveStream")
2+
13
from .core.util.stream import ArbitraryReceiveChannel
24
from .core.util.stream import ArbitraryReceiveStream

datastore/util.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
1+
__all__ = ("receive_channel_from", "receive_stream_from",)
2+
13
from .core.util.stream import receive_channel_from
24
from .core.util.stream import receive_stream_from

tox.ini

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -61,10 +61,3 @@ ignore = E221,E241,E251,E262,E265,E266,E303
6161
use-flake8-tabs = true
6262
max-line-length = 100
6363
tab-width = 4
64-
65-
# `F401: module imported but unused` allowed because these files expose the public API
66-
per-file-ignores =
67-
datastore/util.py:F401
68-
datastore/abc.py:F401
69-
datastore/typing.py:F401
70-
datastore/filesystem/__init__.py:F401

0 commit comments

Comments
 (0)