Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix new type error #489

Merged
merged 3 commits into from
May 18, 2024
Merged

Fix new type error #489

merged 3 commits into from
May 18, 2024

Conversation

JelleZijlstra
Copy link
Collaborator

python/typeshed#11880 correctly points out that not all AST nodes have a line and column number.

python/typeshed#11880 correctly points out that not all AST nodes have a line and column number.
pyi.py Outdated Show resolved Hide resolved
Copy link
Collaborator

@AlexWaygood AlexWaygood left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe a protocol would be a better fit here? Any node will do as long as it has a lineno and col_offset

This comment has been minimized.

@srittau
Copy link
Collaborator

srittau commented May 18, 2024

Maybe a protocol would be a better fit here? Any node will do as long as it has a lineno and col_offset

It might even be worthwhile to add such a protocol to typeshed, considering that this will be a fairly common use case.

@AlexWaygood
Copy link
Collaborator

AlexWaygood commented May 18, 2024

It might even be worthwhile to add such a protocol to typeshed

Yeah — or perhaps useful_types, since it can be awkward to use typeshed-only types in runtime code.

But for now I think we could just roll our own

Copy link

This change has no effect on typeshed. 🤖🎉

Copy link
Collaborator

@AlexWaygood AlexWaygood left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@AlexWaygood AlexWaygood merged commit f1230fc into main May 18, 2024
21 checks passed
@AlexWaygood AlexWaygood deleted the JelleZijlstra-patch-1 branch May 18, 2024 14:44
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.

None yet

3 participants