diff --git a/ChangeLog b/ChangeLog index 6fefa3c5c1..f48f42c2e8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -20,6 +20,11 @@ What's New in Pylint 2.13.9? ============================ Release date: TBA + +* Fix false positives for ``no-name-in-module`` and ``import-error`` for ``numpy.distutils`` and ``pydantic``. + + Closes #6497 + * Fix ``IndexError`` crash in ``uninferable_final_decorators`` method. Relates to #6531 diff --git a/doc/whatsnew/2.13.rst b/doc/whatsnew/2.13.rst index 08c9db2ee8..5c1da5a0f5 100644 --- a/doc/whatsnew/2.13.rst +++ b/doc/whatsnew/2.13.rst @@ -644,6 +644,12 @@ Other Changes Closes #6414 + +* Fix false positives for ``no-name-in-module`` and ``import-error`` for ``numpy.distutils`` + and ``pydantic``. + + Closes #6497 + * Fix ``IndexError`` crash in ``uninferable_final_decorators`` method. Relates to #6531 diff --git a/tests/functional/n/no/no_name_in_module.py b/tests/functional/n/no/no_name_in_module.py index 34e8af569f..2964d78497 100644 --- a/tests/functional/n/no/no_name_in_module.py +++ b/tests/functional/n/no/no_name_in_module.py @@ -78,3 +78,9 @@ # Check ignored-modules setting from argparse import THIS_does_not_EXIST + + +# This captures the original failure in https://github.com/PyCQA/pylint/issues/6497 +# only if numpy is installed. We are not installing numpy on CI (for now) +from numpy.distutils.misc_util import is_sequence +from pydantic import BaseModel