Closed
Description
Would be really nice for the Python API if this project provided type hints along with a py.typed
marker file :)
In terms of the actual implementation, the easiest solution, due to the multitude of overloads on the subprocess functions, would probably be to alias them, e.g.
import subprocess
from typing import TYPE_CHECKING
if TYPE_CHECKING:
run = subprocess.run
...
else:
def run(args, **kwargs):
return subprocess.run([path, *args], **kwargs)
...
For context, I'm planning on supporting this package in https://github.com/RobertCraigie/prisma-client-py which is very strictly typed which means Pyright complains that this package is missing type hints or if any method / variable I access does not have a known type.
from nodejs import node # error: Stub file not found for "nodejs"
Metadata
Metadata
Assignees
Labels
No labels