diff --git a/codespell_lib/_codespell.py b/codespell_lib/_codespell.py index a082e6d1a9..9f211247b7 100644 --- a/codespell_lib/_codespell.py +++ b/codespell_lib/_codespell.py @@ -553,7 +553,7 @@ def parse_options( tomllib_raise_error = True if toml_files: try: - import tomllib # type: ignore + import tomllib # type: ignore[import] except ModuleNotFoundError: try: import tomli as tomllib