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

Automatically check for a src directory in the workspace root - #1522

Merged
Jake Bailey (jakebailey) merged 8 commits into
microsoft:masterfrom
jakebailey:auto-search-paths
Sep 11, 2019
Merged

Jake Bailey (jakebailey) merged 8 commits into
microsoft:masterfrom
jakebailey:auto-search-paths

Conversation

@jakebailey

Copy link
Copy Markdown
Member

Fixes #1440.

Very basic implementation - if there's a top level src directory that doesn't contain a __init__.py file, then add it as an import root. This heuristic can be disabled by setting python.analysis.autoSearchPaths to false.

@jakebailey Jake Bailey (jakebailey) changed the title [WIP] Automatically check for a src directory in the workspace root Sep 9, 2019
@jakebailey
Jake Bailey (jakebailey) merged commit 7577bfd into microsoft:master Sep 11, 2019
@jakebailey
Jake Bailey (jakebailey) deleted the auto-search-paths branch September 11, 2019 22:23
Jake Bailey (jakebailey) added a commit to jakebailey/python-language-server that referenced this pull request Nov 1, 2019
…osoft#1522)

* Add autoSearchPath for detecting a src directory in the root

* Don't add src if it contains a dunder-init

* Remove empty lines

* Move hueristic to its own static class and test it

* PR feedbaack
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

2 participants