bpo-46491: Allow Annotated on outside of Final/ClassVar by GBeauregard · Pull Request #30864 · python/cpython (original) (raw)

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

Already on GitHub?Sign in to your account

Conversation15 Commits6 Checks0 Files changed

Conversation

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

[ Show hidden characters]({{ revealButtonHref }})

GBeauregard

We treat Annotated type arg as class-level annotation. This exempts it from checks against Final and ClassVar in order to allow using them in any nesting order.

https://bugs.python.org/issue46491

Automerge-Triggered-By: GH:gvanrossum

@GBeauregard

This exempts it from checks against Final and ClassVar in order to allow using them in any nesting order.

@blurb-it

JelleZijlstra

Choose a reason for hiding this comment

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

Thanks for your contribution! A few comments.

@gvanrossum

Please add me back once this is ready to merge.

JelleZijlstra

@GBeauregard

JelleZijlstra

Choose a reason for hiding this comment

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

gvanrossum

@gvanrossum

Maybe this should be backported?

@JelleZijlstra

Agree, I added the labels

@miss-islington

@miss-islington

Thanks @GBeauregard for the PR 🌮🎉.. I'm working now to backport this PR to: 3.9, 3.10.
🐍🍒⛏🤖

@bedevere-bot

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request

Jan 25, 2022

@GBeauregard @miss-islington

We treat Annotated type arg as class-level annotation. This exempts it from checks against Final and ClassVar in order to allow using them in any nesting order.

Automerge-Triggered-By: GH:gvanrossum (cherry picked from commit e1abffc)

Co-authored-by: Gregory Beauregard greg@greg.red

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request

Jan 25, 2022

@GBeauregard @miss-islington

We treat Annotated type arg as class-level annotation. This exempts it from checks against Final and ClassVar in order to allow using them in any nesting order.

Automerge-Triggered-By: GH:gvanrossum (cherry picked from commit e1abffc)

Co-authored-by: Gregory Beauregard greg@greg.red

@bedevere-bot

miss-islington added a commit that referenced this pull request

Jan 25, 2022

@miss-islington @GBeauregard

We treat Annotated type arg as class-level annotation. This exempts it from checks against Final and ClassVar in order to allow using them in any nesting order.

Automerge-Triggered-By: GH:gvanrossum (cherry picked from commit e1abffc)

Co-authored-by: Gregory Beauregard greg@greg.red

miss-islington added a commit that referenced this pull request

Jan 25, 2022

@miss-islington @GBeauregard

We treat Annotated type arg as class-level annotation. This exempts it from checks against Final and ClassVar in order to allow using them in any nesting order.

Automerge-Triggered-By: GH:gvanrossum (cherry picked from commit e1abffc)

Co-authored-by: Gregory Beauregard greg@greg.red

hello-adam pushed a commit to hello-adam/cpython that referenced this pull request

Jun 2, 2022

We treat Annotated type arg as class-level annotation. This exempts it from checks against Final and ClassVar in order to allow using them in any nesting order.

Automerge-Triggered-By: GH:gvanrossum (cherry picked from commit e1abffc)

Co-authored-by: Gregory Beauregard greg@greg.red