python / python/mypy

Support PEP 675 (LiteralString)

Open
#12,554 7 comments 27 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

affects-typeshed feature meta topic-literalstring
Dominant language
Python
Stars
20.6k
Forks
3.3k
PR merge metrics
PR metrics pending

Description

We should support LiteralString from PEP 675 (https://peps.python.org/pep-0675/).

As a first step, I would suggest changing the semantic analyzer to treat LiteralString simply as an alias for str. That's not correct, but it will be enough to enable third-party libraries and typeshed to start using LiteralString.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in the semantic analyzer and read PEP 675 to understand the requested LiteralString behavior. Treat LiteralString as an alias for str as the first step, then verify that third-party libraries and typeshed can use it without errors.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
devtools
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.