X-Git-Url: https://git.madduck.net/etc/vim.git/blobdiff_plain/71e71e5f52e5f6bdeae63cc8c11b1bee44d11c30..8ed3e3d07ea3e6d62e3e533e69f96a0ff148cd5d:/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