X-Git-Url: https://git.madduck.net/etc/vim.git/blobdiff_plain/71e71e5f52e5f6bdeae63cc8c11b1bee44d11c30..eb5d175c9cd3c14a0731f8afd0cc5a18264353e7:/src/black/files.py?ds=inline 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