Skip to content

Conversation

@petergaultney
Copy link
Contributor

@petergaultney petergaultney commented Dec 9, 2023

...or libraries that still support Python 3.7

would close #460

Comment on lines +213 to +218
return type in LITERALS or (
isinstance(
type, (_GenericAlias, _LiteralGenericAlias, _SpecialGenericAlias)
)
and type.__origin__ in LITERALS
)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

this is isomorphic to what typing-inspect does and it works in our company's testing as well.

@Tinche
Copy link
Member

Tinche commented Dec 10, 2023

LGTM. Just add the links to the PR and issues to the changelog and we're good to go.

@Tinche
Copy link
Member

Tinche commented Dec 10, 2023

Thanks!

@Tinche Tinche merged commit 3b6bdb7 into python-attrs:main Dec 10, 2023
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.

support typing_extensions Literal

2 participants