Skip to content

Commit

Permalink
Reconfigure arrow/__init__.py to avoid mypy --strict problems (#938)
Browse files Browse the repository at this point in the history
* Explicit reexport values

Mypy prevents the implicit reexport, when --no-implicit-reexport is given.

* Add missing ParserError and add comment

* Fix typo in comment
  • Loading branch information
weddige authored Mar 5, 2021
1 parent 77b4c5d commit c577c76
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions arrow/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,25 @@
FORMAT_W3C,
)
from .parser import ParserError

# https://mypy.readthedocs.io/en/stable/command_line.html#cmdoption-mypy-no-implicit-reexport
# Mypy with --strict or --no-implicit-reexport requires an explicit reexport.
__all__ = [
"__version__",
"get",
"now",
"utcnow",
"Arrow",
"ArrowFactory",
"FORMAT_ATOM",
"FORMAT_COOKIE",
"FORMAT_RFC822",
"FORMAT_RFC850",
"FORMAT_RFC1036",
"FORMAT_RFC1123",
"FORMAT_RFC2822",
"FORMAT_RFC3339",
"FORMAT_RSS",
"FORMAT_W3C",
"ParserError",
]

0 comments on commit c577c76

Please sign in to comment.