Skip to content

TYP: adopt typing.LiteralString and use more of typing.Literal#26871

Merged
rgommers merged 1 commit intonumpy:mainfrom
jorenham:literalstring-and-more-literal
Jul 23, 2024
Merged

TYP: adopt typing.LiteralString and use more of typing.Literal#26871
rgommers merged 1 commit intonumpy:mainfrom
jorenham:literalstring-and-more-literal

Conversation

@jorenham
Copy link
Copy Markdown
Member

@jorenham jorenham commented Jul 5, 2024

Limited to the global numpy namespace.

See typing spec or PEP 675 for details on typing.LiteralString.

Because typing.LiteralString was introduced in Python 3.11, LiteralString is set to be an alias of builtins.str on python<3.11.

@jorenham
Copy link
Copy Markdown
Member Author

See #26975 for similar changes in the numpy.version module.

@charris charris changed the title TYP: adopt typing.LiteralString and use more of typing.Literal TYP: adopt typing.LiteralString and use more of typing.Literal Jul 18, 2024
@jorenham jorenham force-pushed the literalstring-and-more-literal branch 2 times, most recently from e926ddc to b65a202 Compare July 22, 2024 03:32
@rgommers rgommers added this to the 2.1.0 release milestone Jul 23, 2024
Copy link
Copy Markdown
Member

@rgommers rgommers left a comment

Choose a reason for hiding this comment

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

LGTM, very nice. Thanks @jorenham

@rgommers
Copy link
Copy Markdown
Member

Ah another conflict - could you please resolve it?

Limited to the global `numpy` namespace.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants