springload / draftjs_exporter

Convert Draft.js ContentState to HTML
https://www.draftail.org/blog/2018/03/13/rethinking-rich-text-pipelines-with-draft-js
MIT License
83 stars 21 forks source link

#101 Add type annotations checked with mypy #123

Closed thibaudcolas closed 4 years ago

thibaudcolas commented 4 years ago

Background & research: https://thib.me/python-static-type-checking-field-test


See #101. This adds type annotations to the project, along with static type checking with mypy. This is only using syntax and stdlib types from Python 3.5 or below, to avoid introducing new compatibility hurdles. In the future it would be nice to leverage Python 3.6+ variables annotation syntax, and potentially also types added in Python 3.8 and backported with typing_extensions.


Thanks for contributing to this project!