Closed code-yeongyu closed 1 year ago
mypy
mypy cannot satisfy philosophy 1
The following code cannot be passed by mypy while the return type can be inferable.
def greeting(name: str): print(f"hello {name}")
this can be ignored by setting no-untyped-def=false.
no-untyped-def=false
but that code violates 2.
def greeting(name): print(f"hello {name}")
and it's slow.
pyright satisfies the philosophy, with these options in this PR.
pyright
... and it's way faster than mypy and easy to integrate with vscode's pylance.
Context
Type Checker Philosophies
mypy
mypy
cannot satisfy philosophy 1The following code cannot be passed by mypy while the return type can be inferable.
this can be ignored by setting
no-untyped-def=false
.but that code violates 2.
and it's slow.
pyright
pyright
satisfies the philosophy, with these options in this PR.... and it's way faster than
mypy
and easy to integrate with vscode's pylance.Changes
pyright
withmypy