Skip to content

Update ty to 0.0.86 - #16553

Open
srittau wants to merge 1 commit into
python:mainfrom
srittau:ty-0.0.86
Open

srittau wants to merge 1 commit into
python:mainfrom
srittau:ty-0.0.86

Conversation

@srittau

@srittau srittau commented Oct 17, 2026

Copy link
Copy Markdown
Collaborator

Ignore rule invalid-property-type-override with the same reasoning as the other incompatible override rules.

Ignore rule `invalid-property-type-override` with the same reasoning as
the other incompatible override rules.
@srittau

srittau commented Oct 17, 2026

Copy link
Copy Markdown
Collaborator Author

Cf. #16551

@JelleZijlstra @AlexWaygood Maybe one of you could have a look?

Claude also tells me:

One looks like a ty bug. In antlr4/Parser.pyi:80, state: int overrides Recognizer.state, a property whose setter takes int. ty says the override "does not accept writes of type int", but a plain int attribute obviously does.

I agree with Claude here. Even if overriding a property with an attribute is not accepted (although I'd argue that it should be in this case), at least the error message is misleading. Should I report this to ty?

@JelleZijlstra

Copy link
Copy Markdown
Member

That does sound like a bug, but I can't currently reproduce it: https://play.ty.dev/229cf4e3-8fbe-4d65-91ec-34233f065837 . Either it's already fixed or there is some aspect of the stubs that make it behave differently.

@JelleZijlstra

Copy link
Copy Markdown
Member

Codex figured out the missing ingredient: these classes have slots. Reported astral-sh/ty#4745.

For typeshed, we can also probably remove the state: int declaration in the subclass, as it's redundant.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants