This repository was archived by the owner on Apr 26, 2024. It is now read-only.
This repository was archived by the owner on Apr 26, 2024. It is now read-only.
Use PEP 675 LiteralString
to refine database function annotations #13473
Open
Description
PEP 675 proposes a new typing.LiteralString
type. The idea is that typecheckers should check that a LiteralString
is composed only from string literals (i.e. cannot contain user-provided data), to help mitigate e.g. SQL injection attacks. This sounds like a nice-to-have for us, though it's probably not worth picking up until mypy has support for the type (python/mypy#12554).
Metadata
Metadata
Assignees
Labels
DB stuff like queries, migrations, new/remove columns, indexes, unexpected entries in the dbMost users are unlikely to come across this or unexpected workflowMinor significance, cosmetic issues, low or no impact to users.New features, changes in functionality, improvements in performance, or user-facing enhancements.Makes developers' lives better, but doesn't have direct user impact