Giter Site home page Giter Site logo

Comments (1)

jacobtylerwalls avatar jacobtylerwalls commented on August 21, 2024 1

Thanks for the report!

Slimmer reproducer without multiple bases:

class Window:
    ...

class Win(Window):
    def __init__(self, txt):
        super().__init__(txt)

Win('hello')

I'm assuming that this case is missed in this block of code:

# Decrement `num_positional_args` by 1 when a function call is assigned to a class attribute
# inside the class where the function is defined.
# This avoids emitting `too-many-function-args` since `num_positional_args`
# includes an implicit `self` argument which is not present in `called.args`.
if (
isinstance(node.frame(), nodes.ClassDef)
and isinstance(called, nodes.FunctionDef)
and called in node.frame().body
and num_positional_args > 0
and "builtins.staticmethod" not in called.decoratornames()
):

from pylint.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.