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 bad-super-call for non-direct parents #6956

Merged
merged 7 commits into from Jun 16, 2022

Conversation

DanielNoord
Copy link
Collaborator

  • Write a good description on what the PR does.
  • Add an entry to the change log describing the change in
    doc/whatsnew/2/2.15/index.rst (or doc/whatsnew/2/2.14/full.rst
    if the change needs backporting in 2.14). If necessary you can write
    details or offer examples on how the new change is supposed to work.
  • If you used multiple emails or multiple names when contributing, add your mails
    and preferred name in script/.contributors_aliases.json

Type of Changes

Type
🐛 Bug fix

Description

Closes #4922, Closes #2903

@DanielNoord DanielNoord added Bug 🪲 False Positive 🦟 A message is emitted but nothing is wrong with the code labels Jun 15, 2022
@DanielNoord DanielNoord added this to the 2.14.3 milestone Jun 15, 2022
@DanielNoord DanielNoord added the Needs backport Needs to be cherry-picked on the current patch version by a pylint's maintainer label Jun 15, 2022
@coveralls
Copy link

coveralls commented Jun 15, 2022

Pull Request Test Coverage Report for Build 2505372022

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

Files with Coverage Reduction New Missed Lines %
pylint/checkers/variables.py 21 96.61%
Totals Coverage Status
Change from base Build 2501912757: 0.0%
Covered Lines: 16413
Relevant Lines: 17177

💛 - Coveralls

@github-actions

This comment has been minimized.

doc/data/messages/b/bad-super-call/bad.py Outdated Show resolved Hide resolved
doc/data/messages/b/bad-super-call/good.py Outdated Show resolved Hide resolved


# Reported in https://github.com/PyCQA/pylint/issues/4922
class AlabamaCousin(Child, Niece):
Copy link
Member

Choose a reason for hiding this comment

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

Well, that's very funny 😄 CarlosTwoOfSpain works too if we want to keep the goodwill of alabamians 😛

Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
@github-actions
Copy link
Contributor

🤖 Effect of this PR on checked open source code: 🤖

Effect on astroid:
The following messages are now emitted:

  1. useless-suppression:
    Useless suppression of 'bad-super-call'
    https://github.com/PyCQA/astroid/blob/main/astroid/exceptions.py#L280

The following messages are no longer emitted:

  1. suppressed-message:
    Suppressed 'bad-super-call' (from line 280)
    https://github.com/PyCQA/astroid/blob/main/astroid/exceptions.py#L282

Effect on sentry:
The following messages are no longer emitted:

  1. bad-super-call:
    Bad first argument 'SlackDMRequest' given to super()
    https://github.com/getsentry/sentry/blob/master/src/sentry/integrations/slack/requests/event.py#L36
  2. bad-super-call:
    Bad first argument 'IntegrationEventAction' given to super()
    https://github.com/getsentry/sentry/blob/master/src/sentry/rules/actions/integrations/create_ticket/base.py#L21
  3. bad-super-call:
    Bad first argument 'Exception' given to super()
    https://github.com/getsentry/sentry/blob/master/src/sentry/features/exceptions.py#L10

This comment was generated for commit 39c46f5

@Pierre-Sassoulas Pierre-Sassoulas merged commit 600a47e into pylint-dev:main Jun 16, 2022
@DanielNoord DanielNoord deleted the bad-super branch June 16, 2022 11:40
Pierre-Sassoulas added a commit to Pierre-Sassoulas/pylint that referenced this pull request Jun 18, 2022
Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
@Pierre-Sassoulas Pierre-Sassoulas added Backported and removed Needs backport Needs to be cherry-picked on the current patch version by a pylint's maintainer labels Jun 18, 2022
Pierre-Sassoulas added a commit that referenced this pull request Jun 18, 2022
Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Backported Bug 🪲 False Positive 🦟 A message is emitted but nothing is wrong with the code
Projects
None yet
3 participants