Skip to content

No error for missing argument in type comment if function nested within method #5806

@JukkaL

Description

@JukkaL

There is no error reported for g even though the type comment is clearly missing an argument type:

class A:
    def f(self): 
        # type: () -> None
        def g(x): 
            # type: () -> None  # No error
            pass

def f2(): 
    # type: () -> None
    def g2(x): 
        # type: () -> None  # Correctly reported
        pass

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions