Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use sys.version_info in compatibility layer (#220)
* Use sys.version_info in compatibility layer Fixes #219 Static type checkers are able to understand checks against sys.version_info much better than try-except. In general, if type checkers tried to handle conditional imports fancily, this would result in unsoundness. Another reason is that you may have tomli conditionally installed based on Python version, in which case a type checker would not even have a way of knowing what tomli is. * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Taneli Hukkinen <[email protected]>
- Loading branch information