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

How to change the default folder for typings #285

Closed
AllanDaemon opened this issue Aug 26, 2020 · 8 comments
Closed

How to change the default folder for typings #285

AllanDaemon opened this issue Aug 26, 2020 · 8 comments
Assignees
Labels
fixed in next version (main) A fix has been implemented and will appear in an upcoming version needs documentation Improvements or additions to documentation

Comments

@AllanDaemon
Copy link

When I ask to generate a stub from a library, it creates a folder typings/libname in the root directory. I wanna change it, in the workspace, to create this folder in another place (eg. .vscode/typings) instead of the root directory, as this breaks the folder structure of the project. I tried to find it in the settings but there isn't anything like that.

Where do I change it?

@savannahostrowski savannahostrowski self-assigned this Aug 26, 2020
@savannahostrowski
Copy link
Contributor

Hey there! You can change the path by setting python.analysis.stubPath in your settings.json.

@savannahostrowski savannahostrowski added the waiting for user response Requires more information from user label Aug 26, 2020
@github-actions github-actions bot removed the triage label Aug 26, 2020
@AllanDaemon
Copy link
Author

Oh. I had understood that python.analysis.stubPath is like the extra paths config, but for stubs. Now it seems dumb, but maybe a little more clarification in the python.analysis.stubPath description could help a few ones that might not get it like me.

@jakebailey
Copy link
Member

What would you suggest? We show the default value as "./typings" already. Are you looking for it to mention that that's where generated stubs are placed?

@AllanDaemon
Copy link
Author

AllanDaemon commented Aug 26, 2020

well, showing that the default is ./typings would be enough. But I think the problem is that it doesn't show the default in VSCode settings. Not even when hovering it.

image

@jakebailey
Copy link
Member

Ah, interesting. It should be there, but empty/undefined is equivalent to default, so it probably wasn't caught.

@jakebailey jakebailey added needs documentation Improvements or additions to documentation and removed waiting for user response Requires more information from user labels Aug 26, 2020
@AllanDaemon
Copy link
Author

Maybe this is more a VS Code issue, that seems to never show the defaults for some kind of fields.

@jakebailey
Copy link
Member

No, it's up to the extension to declare its defaults, so we just have to add it in.

@jakebailey jakebailey added the fixed in next version (main) A fix has been implemented and will appear in an upcoming version label Sep 2, 2020
@jakebailey
Copy link
Member

This issue has been fixed in version 2020.9.0, which we've just released. You can find the changelog here: https://github.com/microsoft/pylance-release/blob/master/CHANGELOG.md#202090-3-september-2020

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fixed in next version (main) A fix has been implemented and will appear in an upcoming version needs documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

3 participants