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 false positive for no-self-argument #7301

Merged

Conversation

mbyrnepr2
Copy link
Member

Type of Changes

Type
βœ“ πŸ› Bug fix
✨ New feature
πŸ”¨ Refactoring
πŸ“œ Docs

Description

Fix false positive for no-self-argument when a staticmethod is applied to a function but uses a different name.

Closes #7300

…ied to a function but uses a different name.

Closes pylint-dev#7300
@coveralls
Copy link

coveralls commented Aug 13, 2022

Pull Request Test Coverage Report for Build 2852893062

  • 2 of 2 (100.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.0005%) to 95.243%

Totals Coverage Status
Change from base Build 2852779687: 0.0005%
Covered Lines: 16838
Relevant Lines: 17679

πŸ’› - Coveralls

@github-actions

This comment has been minimized.

Copy link
Member

@jacobtylerwalls jacobtylerwalls left a comment

Choose a reason for hiding this comment

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

Thanks! Looks good, just some nitpicks I noticed.

@jacobtylerwalls jacobtylerwalls added the False Positive 🦟 A message is emitted but nothing is wrong with the code label Aug 13, 2022
@jacobtylerwalls jacobtylerwalls added this to the 2.15.0 milestone Aug 13, 2022
@@ -1,8 +1,15 @@
"""Check for method without self as first argument"""
# pylint: disable=useless-object-inheritance
from __future__ import print_function
Copy link
Member

Choose a reason for hiding this comment

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

Nice catch ! If there are a lot of those we could create another merge request to fix all of those python2 remnants at once

@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 dc58f0c

@jacobtylerwalls jacobtylerwalls merged commit 0fa2d6e into pylint-dev:main Aug 13, 2022
@mbyrnepr2 mbyrnepr2 deleted the 7300_staticmethod_false_positive branch August 13, 2022 18:53
@junrushao
Copy link

Thank you for fixing the issue @mbyrnepr2!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
False Positive 🦟 A message is emitted but nothing is wrong with the code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

False positive on decorators that return a staticmethod
5 participants