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

Don't calculate slots when MRO parsing fails. #1089

Merged
merged 20 commits into from
Aug 1, 2021

Conversation

doranid
Copy link
Contributor

@doranid doranid commented Jul 7, 2021

Steps

  • For new features or bug fixes, add a ChangeLog entry describing what your PR does.
  • Write a good description on what the PR does.

Description

slots() won't now fail if it can't parse the mro object.
I'm not sure that's the right way to fix that.

Type of Changes

Type
🐛 Bug fix

Related Issue

#1088

Thanks!

@Pierre-Sassoulas Pierre-Sassoulas added this to the 2.6.3 milestone Jul 9, 2021
@Pierre-Sassoulas
Copy link
Member

Probably the astroid fix we need for pylint-dev/pylint#4688, thank you !

@doranid
Copy link
Contributor Author

doranid commented Jul 9, 2021

Probably the astroid fix we need for PyCQA/pylint#4688, thank you !

These two issues are orthogonal as per my understanding.

Thanks!

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.

I don't know how I would test that, but would it be possible to add an automated test for this change ?

astroid/scoped_nodes.py Outdated Show resolved Hide resolved
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 for adding a test, I'm going to wait for another reviewer before merging :)

@Pierre-Sassoulas Pierre-Sassoulas added the pylint-tested PRs that don't cause major regressions with pylint label Jul 12, 2021
@Pierre-Sassoulas Pierre-Sassoulas modified the milestones: 2.6.3, 2.6.4, 2.6.5, 2.6.6 Jul 19, 2021
@Pierre-Sassoulas Pierre-Sassoulas merged commit e178626 into pylint-dev:main Aug 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug 🪳 pylint-tested PRs that don't cause major regressions with pylint
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants