X-Git-Url: https://git.madduck.net/etc/vim.git/blobdiff_plain/e912c7ff54c392e92a765c5eff0bd2ca3bb05b47..e8aadedd970140a840e8120bd36e8df52cc26ed2:/src/black/__init__.py diff --git a/src/black/__init__.py b/src/black/__init__.py index c7c5d72..91f70d9 100644 --- a/src/black/__init__.py +++ b/src/black/__init__.py @@ -42,7 +42,6 @@ from typing import ( cast, TYPE_CHECKING, ) -from typing_extensions import Final from mypy_extensions import mypyc_attr from appdirs import user_cache_dir @@ -61,6 +60,11 @@ from blib2to3.pgen2.parse import ParseError from _black_version import version as __version__ +if sys.version_info < (3, 8): + from typing_extensions import Final +else: + from typing import Final + if TYPE_CHECKING: import colorama # noqa: F401 @@ -737,7 +741,7 @@ def reformat_many( worker_count = os.cpu_count() if sys.platform == "win32": # Work around https://bugs.python.org/issue26903 - worker_count = min(worker_count, 61) + worker_count = min(worker_count, 60) try: executor = ProcessPoolExecutor(max_workers=worker_count) except (ImportError, OSError):