Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

gh-89547: Add support for nesting special forms like Final#116092

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Conversation

hmc-cs-mdrissi
Copy link
Contributor

@hmc-cs-mdrissihmc-cs-mdrissi commentedFeb 29, 2024
edited by bedevere-appbot
Loading

Resolves thisissue. The main goal was to permitClassVar[Final[int]] andFinal[ClassVar[int]]. This drops validation check that Final/ClassVar argument is not a special form.

This does allow some silly cases likeClassVar[ClassVar[int]] but I think it's simpler to allow them then have more complex validation rules at runtime. I did not remove special form check for other forms soUnion[ClassVar[int], int] remains forbidden andlist[ClassVar[int]] is also forbidden. There already was a test case thatlist[ClassVar[int]] fails.

I also added couple tests for Annotated to ensure it can nest freely withClassVar/Final.

@ghost
Copy link

The following commit authors need to sign the Contributor License Agreement:

Click the button to sign:
CLA not signed

@hmc-cs-mdrissi
Copy link
ContributorAuthor

Hmm, for CLA it's probably easier if I close and remake the PR with email of this account. That's my work email, which has a github account, but it's github enterprise account and unsure how to sign with it.

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@JelleZijlstraJelleZijlstraAwaiting requested review from JelleZijlstraJelleZijlstra is a code owner

@AlexWaygoodAlexWaygoodAwaiting requested review from AlexWaygoodAlexWaygood is a code owner

Assignees
No one assigned
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

1 participant
@hmc-cs-mdrissi

[8]ページ先頭

©2009-2025 Movatter.jp