Skip to content

Instantly share code, notes, and snippets.

@krscott
Created May 15, 2023 12:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save krscott/6d480c4cc9cbc0d2a3da6929623282c3 to your computer and use it in GitHub Desktop.
Save krscott/6d480c4cc9cbc0d2a3da6929623282c3 to your computer and use it in GitHub Desktop.
Nicely handle missing typing info
# Disable "unknown" errors and missing type stubs...
# pyright: reportUnknownMemberType=false
# pyright: reportUnknownVariableType=false
# pyright: reportUnknownArgumentType=false
# pyright: reportMissingTypeStubs=false
# ...or, alternatively, only suppress individual objects (but disables intellisense)
from typing import Any
def anytype(x: Any) -> Any:
return x
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment