Skip to content

Commit 1777db2

Browse files
authored
Fix mypy flags import distutils in Python 3.12 (#2225)
## Changes Fix mypy flags `import distutils` in python 3.12. Local `make lint` fails with Python 3.12.
1 parent 35fe959 commit 1777db2

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/databricks/labs/ucx/source_code/python_libraries.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,8 @@ def _get_setup() -> Callable | None:
128128
from setuptools import setup # type: ignore
129129
except (ImportError, AssertionError):
130130
try:
131-
from distutils.core import setup # pylint: disable=deprecated-module
131+
# pylint: disable-next=deprecated-module
132+
from distutils.core import setup # type: ignore
132133
except ImportError:
133134
logger.warning("Could not import setup.")
134135
setup = None

0 commit comments

Comments
 (0)