Skip to content

add pyclbr._Object #11151

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

Merged
merged 3 commits into from
Dec 12, 2023
Merged

add pyclbr._Object #11151

merged 3 commits into from
Dec 12, 2023

Conversation

tungol
Copy link
Contributor

@tungol tungol commented Dec 11, 2023

related to #3968

This comment has been minimized.

This comment has been minimized.

Copy link
Collaborator

@srittau srittau left a comment

Choose a reason for hiding this comment

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

Thanks, two nits (and one comment) below.

def __init__(self, module: str, name: str, file: str, lineno: int, parent: _Object | None) -> None: ...

class Class(_Object):
super: list[Class | str] | None
Copy link
Collaborator

Choose a reason for hiding this comment

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

I know that you only moved it here: But this will have similar issues like children above, especially in the constructor. (I.e. super = ["foo"]; Class(..., super, ...) will fail.) We should probably use Sequence here and in the constructor, but no need to fix this in this PR, as it hasn't made problems so far.

Copy link
Contributor

According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉

@srittau srittau merged commit 92928b5 into python:main Dec 12, 2023
@tungol tungol deleted the pyclbr branch December 12, 2023 22:18
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