Skip to content

mixed-case-variable-in-class-scope (N815) reports mixedCase on class variables of subclassed TypedDict #10671

@teaishealthy

Description

@teaishealthy

Description

ruff 0.1.15

N815 will report on mixedCase class variables on subclasses of a TypedDict, while it won't on the actual TypedDict (as expected)

Minimal reproducible example

from typing import TypedDict

class A(TypedDict):
    mixedCase: int  # no error!

class B(A):
    alsoMixedCase: int  # Variable `alsoMixedCase` in class scope should not be mixedCase

Metadata

Metadata

Assignees

Labels

type-inferenceRequires more advanced type inference.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions