diff --git a/jaraco/text/__init__.py b/jaraco/text/__init__.py index 8567200..510bf93 100644 --- a/jaraco/text/__init__.py +++ b/jaraco/text/__init__.py @@ -1,14 +1,14 @@ import functools import itertools import re +import sys import textwrap - from typing import Iterable -try: - from importlib.resources import files # type: ignore -except ImportError: # pragma: nocover - from importlib_resources import files # type: ignore +if sys.version_info >= (3, 9): + from importlib.resources import files +else: # pragma: nocover + from importlib_resources import files from jaraco.context import ExceptionTrap from jaraco.functools import compose, method_cache diff --git a/mypy.ini b/mypy.ini index 83b0d15..44b76f5 100644 --- a/mypy.ini +++ b/mypy.ini @@ -12,3 +12,12 @@ explicit_package_bases = True # Disable overload-overlap due to many false-positives disable_error_code = overload-overlap + +# Will be replaced by pathlib in 3.10 +[mypy-pathlib2.*] +ignore_missing_imports = True + +# jaraco/jaraco.develop#20 +# Lucretiel/autocommand#38 +[mypy-autocommand.*] +ignore_missing_imports = True diff --git a/pyproject.toml b/pyproject.toml index 1f65a14..576da07 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -75,7 +75,3 @@ type = [ [tool.setuptools_scm] - - -[tool.pytest-enabler.mypy] -# Disabled due to jaraco/skeleton#143