[ty] Use invalid-assignment error code for invalid assignments to ClassVars by AlexWaygood · Pull Request #20156 · astral-sh/ruff (original) (raw)

@AlexWaygood

@AlexWaygood added the ty

Multi-file analysis & type inference

label

Aug 29, 2025

AlexWaygood added a commit that referenced this pull request

Aug 29, 2025

@AlexWaygood

…nts to ClassVars" (#20158)

Reverts #20156. As @sharkdp noted in his post-merge review, there were several issues with that PR that I didn't spot before merging — but I'm out for four days now, and would rather not leave things in an inconsistent state for that long. I'll revisit this on Wednesday.

dcreager added a commit that referenced this pull request

Sep 2, 2025

@dcreager

second-ed pushed a commit to second-ed/ruff that referenced this pull request

Sep 9, 2025

@AlexWaygood @second-ed

…ClassVar`s (astral-sh#20156)

Summary

This error is about assigning to attributes rather than reading attributes, so I think invalid-assignment makes more sense than invalid-attribute-access

Test Plan

existing mdtests updated

second-ed pushed a commit to second-ed/ruff that referenced this pull request

Sep 9, 2025

@AlexWaygood @second-ed

…nts to ClassVars" (astral-sh#20158)

Reverts astral-sh#20156. As @sharkdp noted in his post-merge review, there were several issues with that PR that I didn't spot before merging — but I'm out for four days now, and would rather not leave things in an inconsistent state for that long. I'll revisit this on Wednesday.

KotlinIsland pushed a commit to KotlinIsland/basedpython that referenced this pull request

May 1, 2026

@AlexWaygood

…nts to ClassVars" (#20158)

Reverts astral-sh/ruff#20156. As @sharkdp noted in his post-merge review, there were several issues with that PR that I didn't spot before merging — but I'm out for four days now, and would rather not leave things in an inconsistent state for that long. I'll revisit this on Wednesday.

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters

[ Show hidden characters]({{ revealButtonHref }})