Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Python] Tracker issue for stubs and static type checking #673

Open
StudioWEngineers opened this issue Jan 26, 2025 · 0 comments
Open

[Python] Tracker issue for stubs and static type checking #673

StudioWEngineers opened this issue Jan 26, 2025 · 0 comments

Comments

@StudioWEngineers
Copy link

As a rhino3dm Python user, I'd like to have a better experience with autocompletion for functions, classes, and other objects that are available from the package, as well as with optional static type checkers like mypy. I use Visual Studio Code to write Python code, if that matters.

I list hereafter what, in my humble opinion, are flaws that can be fixed:

  1. Missing stubs, e.g., ObjectColorSource. I would have expected something like this in __init__.pyi:
from enum import Enum

class ObjectColorSource(Enum):
    ColorFromLayer = 0
    ColorFromObject = 1
    ColorFromMaterial = 2
    ColorFromParent = 3
  1. As pointed out in [Python] Update stubs after #665 and #666 #668, many overload stubs are not correct.

I am willing to contribute to improve the current stubs, assuming that PR in this regard would be welcome. Kindly let me know.

Not strictly related to this topic, but support for Python 2 should be removed in __init__.py, since it is no longer supported. Furthermore, since you're switching from pybind11 to nanobind and the latter is a Python 3.8+ library, I would issue a warning so users can update their code if this is the case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant