-
-
Couldn't load subscription status.
- Fork 131
Description
What's wrong
When using type stubs for any given python library the idea is that it helps developers avoid common errors when writing code, one of the most common is accessing non-existent properties.
request.fooBut the types for the Request class do the opposite by casting any random attributes as any instead of informing the user about them, specifically they do it at line 84 in request.pyi:
def __getattr__(self, attr: str) -> Any: ...This is the opposite of what I want in a stubs library, from this or any other one, which is to notify me of non-existent properties, (for example when I make a typo), and that if I ever find myself in the need to use some non-standard attribute for an instace of the Request class I will have to be explicit about it in my code, creating such type myself or by adding # type: ignore next to it, making it completely clear that this is intentional and not accidental.