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

[easy] New rules for assignment to __bases__ #584

Closed
pylint-bot opened this issue Jul 3, 2015 · 4 comments
Closed

[easy] New rules for assignment to __bases__ #584

pylint-bot opened this issue Jul 3, 2015 · 4 comments
Labels

Comments

@pylint-bot
Copy link

Originally reported by: Claudiu Popa (BitBucket: PCManticore, GitHub: @PCManticore)


  • can assign only tuples to __bases__
#!python

class A: pass
A.__bases__ = "lala"
  • can assign only non empty tuples to __bases__
#!python

class A: pass
A.__bases__ = ()
  • __bases__ must be tuple of classes
#!python

class A: pass
A.__bases__ = (1, )

@pylint-bot pylint-bot added the Enhancement ✨ Improvement to a component label Dec 9, 2015
@Pierre-Sassoulas Pierre-Sassoulas added Help wanted 🙏 Outside help would be appreciated, good for new contributors Good first issue Friendly and approachable by new contributors Needs PR This issue is accepted, sufficiently specified and now needs an implementation labels Jun 29, 2022
@clavedeluna
Copy link
Collaborator

I'll work on this issue.

@clavedeluna
Copy link
Collaborator

clavedeluna commented Nov 3, 2022

I've closed the related PR. Agreement on that PR is that it isn't worth adding this check since mypy is doing the same thing. Discussion between naive v. non-naive approach in PR.

I think it would be fine to close this issue or at the very least update the labels (not a good first issue).

@Pierre-Sassoulas Pierre-Sassoulas removed the Good first issue Friendly and approachable by new contributors label Nov 4, 2022
@clavedeluna clavedeluna removed their assignment Nov 17, 2022
@clavedeluna
Copy link
Collaborator

Given I worked on this last, I'm going to close this issue. We discussed that it's not worth doing the naive approach since that's what mypy does, and doing the "hard" approach is pretty hard. I also hope this is a pretty rare pattern.

If anyone disagrees feel free to re-open.

@clavedeluna clavedeluna added Won't fix/not planned and removed Help wanted 🙏 Outside help would be appreciated, good for new contributors Hacktoberfest Needs PR This issue is accepted, sufficiently specified and now needs an implementation labels Nov 18, 2022
@Pierre-Sassoulas Pierre-Sassoulas removed this from the 2.16.0 milestone Nov 18, 2022
@clavedeluna
Copy link
Collaborator

Guess I never did close this....

@clavedeluna clavedeluna closed this as not planned Won't fix, can't repro, duplicate, stale Nov 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants