X-Git-Url: https://git.madduck.net/etc/vim.git/blobdiff_plain/e9681a40dcb3d38b56b301d811bb1c55201fd97e..40053b522ebe8f33328c1c7e29780fc37d17911e:/src/black/__init__.py?ds=sidebyside diff --git a/src/black/__init__.py b/src/black/__init__.py index e9d3c1b..3a2d1cb 100644 --- a/src/black/__init__.py +++ b/src/black/__init__.py @@ -10,6 +10,7 @@ from multiprocessing import Manager, freeze_support import os from pathlib import Path from pathspec.patterns.gitwildmatch import GitWildMatchPatternError +import platform import re import signal import sys @@ -381,7 +382,10 @@ def validate_regex( ) @click.version_option( version=__version__, - message=f"%(prog)s, %(version)s (compiled: {'yes' if COMPILED else 'no'})", + message=( + f"%(prog)s, %(version)s (compiled: {'yes' if COMPILED else 'no'})\n" + f"Python ({platform.python_implementation()}) {platform.python_version()}" + ), ) @click.argument( "src", @@ -1435,7 +1439,9 @@ def patch_click() -> None: else: modules.append(core) try: - from click import _unicodefun + # Removed in Click 8.1.0 and newer; we keep this around for users who have + # older versions installed. + from click import _unicodefun # type: ignore except ImportError: pass else: