Skip to content

Recognize functional class declarations in the base class list #832

@ndmitchell

Description

@ndmitchell

Describe the Bug

from typing import *
from collections import *

class QConfig(namedtuple("QConfig", ["activation", "weight"])):

    def __new__(cls, activation, weight):
        return super().__new__(cls, activation, weight) # E: ERROR 7:49-55: Expected 2 positional arguments, got 3 in function `tuple.__new__`

Sandbox Link

https://pyrefly.org/sandbox/?code=GYJw9gtgBALgngBwJYDsDmUkQWEMoBUAUKJFAMZgA2VApuTEmCgM6ba77FHlUCGLNgEUAws2BI0AChR8ItACYwArgjpSARKPGSNAGigBtDXwZIAbn0bN9UDQHdakgBYwNAXQCUngFxEiUIFQCrTAUAD64Si09pFSvCwGpoyW1igGji4wvgFBeSC0KiAoUCyqtCBSngB0kdGx4fFUiVDJFlZM6VCZaK6eREA

(Only applicable for extension issues) IDE Information

No response

Metadata

Metadata

Assignees

Type

No fields configured for Bug.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions