pyroute2 icon indicating copy to clipboard operation
pyroute2 copied to clipboard

Provide stub files

Open svinota opened this issue 2 years ago • 2 comments

Discussed in https://github.com/svinota/pyroute2/discussions/880

Originally posted by moepman February 14, 2022 I wonder if it would be possible to provide stub files [1] which would help type checkers such as mypy or code completion for IDEs such as PyCharm [2].

[1] https://www.python.org/dev/peps/pep-0484/#stub-files [2] https://youtrack.jetbrains.com/issue/PY-51039

svinota avatar May 23 '22 10:05 svinota

Possible remove dynamic module loading ? I would hardcode all modules in root __init__.py

Update to latest version broke our build system :( because mypy says:

xxx.py:7:0: E0611: No name 'IPRoute' in module 'pyroute2' (no-name-in-module)

socketpair avatar Aug 11 '22 05:08 socketpair

I agree with @socketpair, I think that might help. Right now, my type checker doesn't even know that NDB() exists. See comment here

vincentchov avatar Oct 11 '22 14:10 vincentchov