Repository navigation
Type ASTProcessor targets and ASTReference nodes with protocols - #273
Open
FrancescoPezzella wants to merge 6 commits into
Open
FrancescoPezzella wants to merge 6 commits into
FrancescoPezzella wants to merge 6 commits into
Conversation
FrancescoPezzella
force-pushed
the
astnode-change-minor
branch
from
October 12, 2026 09:33
de72788 to
6926e4f
Compare
FrancescoPezzella
marked this pull request as ready for review
October 12, 2026 09:34
FrancescoPezzella
added this pull request to stack #277
October 12, 2026 09:37
Collaborator
Author
|
Ci/Cd is failing even though more lint errors were solved, 6460 > 6352 (+100 issues solved). Reason for that is that solving one issue, relegated the error somewhere else, exposing another issue that was hidden by the former issue solved. In this way, I would be solving all Type errors for the rest of the days, so to keep the scope of this PR smaller, I will fix some unrelated Type errors to make Ci/Cd pass. |
pjljvandelaar
force-pushed
the
astnode-change-minor
branch
from
October 15, 2026 08:11
33a7252 to
0e788d0
Compare
pjljvandelaar
force-pushed
the
astnode-change-minor
branch
from
October 15, 2026 08:33
0e788d0 to
9909d48
Compare
pjljvandelaar
left a comment
Collaborator
There was a problem hiding this comment.
Some questions raised.
But further looks good.
FrancescoPezzella
force-pushed
the
astnode-change-minor
branch
2 times, most recently
from
October 16, 2026 11:57
6df2aa3 to
f3735fe
Compare
FrancescoPezzella
removed this pull request from stack #277
October 16, 2026 11:58
FrancescoPezzella
added this pull request to stack #295
October 16, 2026 12:13
… over NodeProtocol ASTNode now satisfies NodeProtocol, so adapters that don't subclass ASTNode (RST, CST, LST) type-check, and clang references keep their concrete node type (#269).
Overall around 10 % (600) PyRight issues solved with this PR
FrancescoPezzella
force-pushed
the
astnode-change-minor
branch
from
October 19, 2026 09:12
f3735fe to
6bb55be
Compare
This branch has not been deployed
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Generic code typed its node parameters as
ASTNode, but only the Clang adapters subclassASTNode. The Python RST and CST adapters and the tree-sitter adapter are duck-typed (ADR 03, ADR 06). They already worked at runtime but failed type checking againstASTProcessorandASTReference. This PR types those APIs with the existing protocols instead, so any adapter that satisfies them type-checks.No runtime behaviour changes: only type annotations, one TODO and test fixture annotations.
Refers to #269, partially fixes some of the issues
Relates to #149