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

Method of exporting classes in modules is unfriendly to type hints/language servers #52

Open
zyzil opened this issue Oct 11, 2023 · 1 comment
Labels
enhancement New feature or request

Comments

@zyzil
Copy link

zyzil commented Oct 11, 2023

I've been starting to work with the Snowflake ML library and have noticed that I don't get much information about types to assist with docstrings, autocomplete, etc.

I believe the method used by modules to specify their exports may be preventing VS Code's language server from knowing the true types of exported objects and thus prevents showing of members, docstrings, etc.

Here is an example of trying to use snowflake.ml.modeling.pieline.Pipeline in VS Code with the Snowflake ML Pipeline vs scikit-learn's Pipeline:

Snowflake ML

image

Here, I've constructed a pipeline which does work, but doesn't show correct type information. You can see VS Code's language server detects Any for the pipe variables instead of Pipeline.

Scikit-learn

image

Here is the same constructs using scikit-learn, In this example, it properly detects that pipe is a Pipeline. With this, it allows me to auto-complete methods and show docstring information as I'm going.

@sfc-gh-thoyt sfc-gh-thoyt added the enhancement New feature or request label Oct 18, 2023
@sfc-gh-sagupta
Copy link

Thank you for this comment and feedback. We are adding this to our feature request list and will prioritize this along with other enhancements.

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

No branches or pull requests

3 participants