Skip to content
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

Fix ModuleNotFoundError when using pylint_django #7940

Merged
merged 1 commit into from Dec 14, 2022

Conversation

living180
Copy link
Contributor

Type
βœ“ πŸ› Bug fix

Description

Ensure that the import path is fixed up before calling ._astroid_module_checker() so that the pylint_django plugin can successfully import the Django settings module when its checkers are initialized.

Closes #7938

Ensure that the import path is fixed up before calling
._astroid_module_checker() so that the pylint_django plugin can
successfully import the Django settings module when its checkers are
initialized.
@coveralls
Copy link

Pull Request Test Coverage Report for Build 3695649934

  • 2 of 2 (100.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 95.474%

Totals Coverage Status
Change from base Build 3682617693: 0.0%
Covered Lines: 17657
Relevant Lines: 18494

πŸ’› - Coveralls

@Pierre-Sassoulas Pierre-Sassoulas added Bug πŸͺ² Downstream Bug πŸͺ² The problem happens in a lib depending on pylint, not pylint backport maintenance/2.15.x labels Dec 14, 2022
@Pierre-Sassoulas Pierre-Sassoulas added this to the 2.15.9 milestone Dec 14, 2022
@Pierre-Sassoulas Pierre-Sassoulas removed the Downstream Bug πŸͺ² The problem happens in a lib depending on pylint, not pylint label Dec 14, 2022
@github-actions
Copy link
Contributor

πŸ€– According to the primer, this change has no effect on the checked open source code. πŸ€–πŸŽ‰

This comment was generated for commit 1cc95a5

Copy link
Collaborator

@DanielNoord DanielNoord left a comment

Choose a reason for hiding this comment

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

THanks!

@DanielNoord
Copy link
Collaborator

@Pierre-Sassoulas pypy doesn't seem to be broken here?

Copy link
Member

@Pierre-Sassoulas Pierre-Sassoulas left a comment

Choose a reason for hiding this comment

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

Thank you for the subtle fix @living180 πŸ‘

@DanielNoord : It's a new cache that is buggy, it started when a dependency change made the python 3.8 env be regenerated I think. This branch is probably using the old cache.

@Pierre-Sassoulas Pierre-Sassoulas merged commit 491eef5 into pylint-dev:main Dec 14, 2022
github-actions bot pushed a commit that referenced this pull request Dec 14, 2022
Ensure that the import path is fixed up before calling
._astroid_module_checker() so that the pylint_django plugin can
successfully import the Django settings module when its checkers are
initialized.

Closes #7938

(cherry picked from commit 491eef5)
Pierre-Sassoulas pushed a commit that referenced this pull request Dec 14, 2022
Ensure that the import path is fixed up before calling
._astroid_module_checker() so that the pylint_django plugin can
successfully import the Django settings module when its checkers are
initialized.

Closes #7938

(cherry picked from commit 491eef5)

Co-authored-by: Daniel Harding <dharding@living180.net>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ModuleNotFound error with pylint-django plugin
4 participants