Remove unnecessary field aliases (`Str`, `Int`, `Bool`, etc.)
See original GitHub issueMarshmallow/Flask-Marshmallow provides some aliases for fields, for example, Str
and String
. To keep everything simple and consistent, I suggest removing these aliases, so that the IDE will not prompt Url
and URL
when you type “U” (in that case the users have to make the choice each time).
Proposal:
Remove the following aliases:
- Str
- Int
- Bool
- Url
- UrlFor
- AbsoluteUrlFor
Keep the following:
- String
- Integer
- Boolean
- URL
- URLFor
- AbsoluteURLFor
Originally posted in https://github.com/greyli/apiflask/issues/63
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Remove all special characters, punctuation and spaces from ...
This will remove all special characters, punctuation, and spaces from a string and only have numbers and letters.
Read more >typing — Support for type hints — Python 3.11.1 documentation
The function below takes and returns a string and is annotated as follows: ... A type alias is defined by assigning the type...
Read more >Language Guide (proto3) | Protocol Buffers - Google Developers
One way to make sure this doesn't happen is to specify that the field numbers (and/or names, which can also cause issues for...
Read more >Model field reference - Django documentation
If True , Django will store empty values as NULL in the database. Default is False . Avoid using null on string-based fields...
Read more >PythonTA Checks
def __init__(self, names: List[str], values: List[int]) -> None: self. ... This error occurs when a boolean expression contains an unneeded negation.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
PEP 20
There’s a reason Python doesn’t have
string
as an alias ofstr
inbuiltins
.Purposefully evading static analysis seems unwise.