Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use mypy recommended conditional imports for compats (#154)
Concerning conditional imports based on the actual Python version at runtime, Mypy recommendation is to explicitly use `sys.version_info` to trigger the relevant import depending on the Python version. Reference to the documentation: https://mypy.readthedocs.io/en/stable/common_issues.html#python-version-and-system-platform-checks Apply this approach to the `compat` module. As a consequence, Mypy does an educated guess on the imports, and `#type: ignore` inline comment is not needed anymore.
- Loading branch information