Skip to content

Regression tests for 73 (distutil import error) #5620

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jan 1, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pylint/typing.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ class MessageLocationTuple(NamedTuple):


class ManagedMessage(NamedTuple):
"""Tuple with information ahout a managed message of the linter"""
"""Tuple with information about a managed message of the linter"""
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps clean up the commit history and don't squash?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're right I wanted to rebase originally but there are other commits that prevents that now.


name: Optional[str]
msgid: str
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
"""
Regression test to check that distutils can be imported
See https://github.com/PyCQA/pylint/issues/73

See also:
https://github.com/PyCQA/pylint/issues/2955
https://github.com/PyCQA/astroid/pull/1321
"""

# pylint: disable=unused-import

import distutils.version
from distutils.util import strtobool
from distutils import doesnottexists # [no-name-in-module]
from distutils.doesnottexists import nope # [no-name-in-module, import-error]
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
no-name-in-module:14:0:14:36::No name 'doesnottexists' in module 'distutils':UNDEFINED
import-error:15:0:15:41::Unable to import 'distutils.doesnottexists':UNDEFINED
no-name-in-module:15:0:15:41::No name 'doesnottexists' in module 'distutils':UNDEFINED