This repository has been archived by the owner on Apr 26, 2024. It is now read-only.
Use PEP 675 LiteralString
to refine database function annotations
#13473
Labels
A-Database
DB stuff like queries, migrations, new/remove columns, indexes, unexpected entries in the db
O-Uncommon
Most users are unlikely to come across this or unexpected workflow
S-Tolerable
Minor significance, cosmetic issues, low or no impact to users.
T-Enhancement
New features, changes in functionality, improvements in performance, or user-facing enhancements.
Z-Dev-Wishlist
Makes developers' lives better, but doesn't have direct user impact
PEP 675 proposes a new
typing.LiteralString
type. The idea is that typecheckers should check that aLiteralString
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).The text was updated successfully, but these errors were encountered: