Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on Apr 14, 2022. It is now read-only.
This repository was archived by the owner on Apr 14, 2022. It is now read-only.

Improve user/library code distinction in searchPaths and PYTHONPATH #794

@jakebailey

Description

@jakebailey

For #720.

We need to distinguish between user and library paths for searchPaths (in initializationOptions) and PYTHONPATH.

The general way to do this for now will be to simply check if a given path is rooted inside the workspace. If it is, then treat it as user code (run extra analysis), otherwise treat it as library code. The current behavior treats everything set by searchPaths to be user code.

Additionally, we'll also be getting PYTHONPATH from the environment, which we should treat the same way. This will help with #469, such that the language server can be started without searchPaths set and still be able to work with more esoteric setups. get_search_paths.py can be modified to distinguish items in sys.path that came from PYTHONPATH, or the language server can read the environment variable directly during the initialization.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions