X-Git-Url: https://git.madduck.net/etc/vim.git/blobdiff_plain/5436810921a2649a30f42b82ff6563a1af16d40f..1af29fbfa507daa8166e7aac659e9b2ff2b47a3c:/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