microsoft / microsoft/vscode-python-environments
Feature Request: Easily Add Folder to PYTHONPATH from VS Code UI
まだ誰も着手していません。
- 主要言語
- TypeScript
- スター
- 138
- フォーク
- 62
- 平均マージ
- 1日 4時間
- マージ済み PR(30日)
- 35
説明
Hi, I’m not sure if this belongs here or in vscode-python, but I’d like to request a more user-friendly way to add folders to the Python path in VS Code.
Current Situation
- The
python.analysis.extraPathssetting only affects IntelliSense, not the runtimePYTHONPATH. - Using a
.envfile withPYTHONPATH=path1;path2;path3is unreliable (in my experience) and not user-friendly. - Creating a
.pthfile in.venv/Lib/site-packages/as below works, but is also tedious and not user-friendly.
path1/src/
path2/src/
...
Feature Proposal
It would be very helpful to have:
- A context menu command when right-clicking a folder (e.g., “Add to Python Path”)
- An accessible command in the Command Palette (
Ctrl+Shift+P) - A button in the python-environments extension UI (it would be very intuitive to have a small icon/button next to each venv in the list. Clicking this button could prompt the user to select a folder, and then automatically add that folder to the venv using the
.pthmethod.)
This should add the folder to the Python path of the currently selected virtual environment in VS Code.
This would make managing the Python path much easier, especially for users coming from PyCharm, where this is a standard feature.
Thanks!
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
この issue ではファイル、テスト、実装のエントリポイントが指定されていないため、まずこれが vscode-python と vscode-python-environments のどちらに該当するかを判断し、既存の環境 UI とコマンド登録を確認します。完了とするには、スコープが決定され、選択したフォルダーを現在選択されている仮想環境の Python パスに追加する、ユーザー向けの方法が必要です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- python, vscode
- 領域
- developer-experience, tooling
- issue の種類
- 機能追加
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 活発さ
- 停滞
- 明瞭さ
- 説明が足りない
- 初心者へのやさしさ
- 25/100