Skip to content

Commit c577c76

Browse files
authored
Reconfigure arrow/__init__.py to avoid mypy --strict problems (#938)
* Explicit reexport values Mypy prevents the implicit reexport, when --no-implicit-reexport is given. * Add missing ParserError and add comment * Fix typo in comment
1 parent 77b4c5d commit c577c76

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

arrow/__init__.py

+22
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,25 @@
1515
FORMAT_W3C,
1616
)
1717
from .parser import ParserError
18+
19+
# https://mypy.readthedocs.io/en/stable/command_line.html#cmdoption-mypy-no-implicit-reexport
20+
# Mypy with --strict or --no-implicit-reexport requires an explicit reexport.
21+
__all__ = [
22+
"__version__",
23+
"get",
24+
"now",
25+
"utcnow",
26+
"Arrow",
27+
"ArrowFactory",
28+
"FORMAT_ATOM",
29+
"FORMAT_COOKIE",
30+
"FORMAT_RFC822",
31+
"FORMAT_RFC850",
32+
"FORMAT_RFC1036",
33+
"FORMAT_RFC1123",
34+
"FORMAT_RFC2822",
35+
"FORMAT_RFC3339",
36+
"FORMAT_RSS",
37+
"FORMAT_W3C",
38+
"ParserError",
39+
]

0 commit comments

Comments
 (0)