-
Notifications
You must be signed in to change notification settings - Fork 771
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
Add a builtins
parameter
#2103
Comments
Pylance doesn't hard-code the definition of "builtins". Rather, it uses the type information from the |
We've received this request from a number of users, so I've implemented a less-cumbersome way to extend the builtins namespace. For details, refer to this documentation. This new capability will be included in next week's release of pylance. |
This issue has been fixed in version 2022.2.1, which we've just released. You can find the changelog here: CHANGELOG.md |
So, I have a question about using the |
You should be able to import those other modules in import foo as foo |
So if the modules are not actually available outside of the databricks runtime, I would need to write a mock up module with the necessary submodules and classes and then import them into the |
Yes, that's correct. |
Hello,
I am working on databricks notebooks and I use VScode to edit the content of the notebooks.
I make extensive use of builtin databricks functions such as
dbutils
orspark
. However I find Pylance raises an UndefinedVariable on those functions as they are not locally declared.I would like to be able to specify some builtins functions that pylance won't raise an undefined error on. I imagine this would be similar to flake8's approach on the subject, see here
Even better : I would like to be able to specify a databricks profile where all databricks' builtin functions will be already defined (and autocompletion compatible). But not sure that fits in the philosophy of the package.
The text was updated successfully, but these errors were encountered: