X-Git-Url: https://git.madduck.net/etc/vim.git/blobdiff_plain/71e71e5f52e5f6bdeae63cc8c11b1bee44d11c30..fa6caa6ca8489103d22d23f8f4ae4d3569bb115e:/src/black/files.py diff --git a/src/black/files.py b/src/black/files.py index 52c77c6..0382397 100644 --- a/src/black/files.py +++ b/src/black/files.py @@ -22,7 +22,11 @@ from pathspec import PathSpec from pathspec.patterns.gitwildmatch import GitWildMatchPatternError if sys.version_info >= (3, 11): - import tomllib + try: + import tomllib + except ImportError: + # Help users on older alphas + import tomli as tomllib else: import tomli as tomllib