-
Notifications
You must be signed in to change notification settings - Fork 30
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
option in the vscode extension to specify the location of pyproject.toml
/pyrightconfig.json
#941
Comments
that should work. could you provide some more info please:
|
Yes sorry
Here is the code with errors from pathlib import Path
from typing import Any
import pandas as pd
dataset_folder: Path = Path("data/Dataset_Edstats_csv/")
csv_files: list[Path] = list(dataset_folder.glob("*.csv"))
print(f"Fichiers CSV trouvés : {[file.name for file in csv_files]}")
dfs: dict[str, pd.DataFrame] = {file.stem: pd.read_csv(file) for file in csv_files}
# Liste pour stocker les informations de chaque dataframe
summary_data: list[dict[str, Any]] = []
for name, df in dfs.items():
summary_data.append({
"Fichier": name,
"Dimensions": df.shape,
"Noms colonnes": df.columns.tolist(),
"Types de données": df.dtypes,
}) |
Everything is fine when using |
Here is the output [Info - 14:18:27] basedpyright language server 1.1.390 starting
[Info - 14:18:27] Server root directory: file:///home/laguill/Documents/01-Etudes/OpenClassrooms/P2_Analysez-donnees-systemes-educatifs/.pixi/envs/default/lib/python3.13/site-packages/basedpyright/dist
[Info - 14:18:27] Starting service instance "quarto_project"
Received pythonPath from Python extension: /home/laguill/Documents/01-Etudes/OpenClassrooms/P2_Analysez-donnees-systemes-educatifs/.pixi/envs/default/bin/python
[Info - 14:18:29] Setting pythonPath for service "quarto_project": "/home/laguill/Documents/01-Etudes/OpenClassrooms/P2_Analysez-donnees-systemes-educatifs/.pixi/envs/default/bin/python"
[Info - 14:18:29] No include entries specified; assuming /home/laguill/Documents/01-Etudes/OpenClassrooms/P2_Analysez-donnees-systemes-educatifs/quarto_project
[Info - 14:18:29] Auto-excluding **/node_modules
[Info - 14:18:29] Auto-excluding **/__pycache__
[Info - 14:18:29] Auto-excluding **/.*
[Info - 14:18:29] Assuming Python version 3.13.1.final.0
[Info - 14:18:29] Found 1 source file
[Info - 14:18:29] Background analysis(1) root directory: file:///home/laguill/Documents/01-Etudes/OpenClassrooms/P2_Analysez-donnees-systemes-educatifs/.pixi/envs/default/lib/python3.13/site-packages/basedpyright/dist
[Info - 14:18:29] Background analysis(1) started
[Info - 14:18:34] [BG(1)] Long operation: checking: file:///home/laguill/Documents/01-Etudes/OpenClassrooms/P2_Analysez-donnees-systemes-educatifs/quarto_project/test.py (4257ms)
[Info - 14:18:34] [BG(1)] Long operation: analyzing: file:///home/laguill/Documents/01-Etudes/OpenClassrooms/P2_Analysez-donnees-systemes-educatifs/quarto_project/test.py (5894ms) |
the |
No no My project dependencies are defined also in pyproject.toml tree
.
├── .gitattributes
├── .gitignore
├── .mypy_cache
│ ├── 3.13
│ ├── CACHEDIR.TAG
│ └── .gitignore
├── .pixi
│ ├── envs
│ └── .gitignore
├── pixi.lock
├── pyproject.toml
├── quarto_project
│ ├── data
│ ├── Décrivez+et+nettoyez+votre+jeu+de+données
│ ├── edProfile.html
│ ├── index.qmd
│ ├── .mypy_cache
│ ├── Numpy.qmd
│ ├── _output
│ ├── Pandas.qmd
│ ├── .quarto
│ ├── _quarto.yml
│ ├── style.css
│ ├── test.py
│ └── .vscode
├── .ruff_cache
│ ├── 0.8.1
│ ├── CACHEDIR.TAG
│ └── .gitignore
└── src
└── p2_analysez_donnees_systemes_educatifs |
thanks for the info, will investigate this further |
pyproject.toml
workspace is a subfolder of the project root
this functionality appears to be intentional: basedpyright/packages/pyright-internal/src/analyzer/service.ts Lines 626 to 635 in 66113b8
we can probably add an option to the language server to specify the path to the config file, like the |
pyproject.toml
workspace is a subfolder of the project rootpyproject.toml
when workspace is a subfolder of the project root
Hi @DetachHead 👋 Thank you very much for your work. 🚀 I have my project root folder, where I have several folders, and inside the When I |
pyproject.toml
when workspace is a subfolder of the project rootpyproject.toml
/pyrightconfig.json
@laguill would you mind elaborating on your use case for only opening a subfolder of your project in vscode instead of the whole repo? @Tragio's situation where i will probably just add an option in the extension settings where you can specify the path to |
I usually open vscode from the terminal in a subfolder of my project after activating my environment. |
personally i always open the project in vscode because i have vscode configured to automatically activate the environment for me: // .vscode/settings.json
{
"python.terminal.activateEnvInCurrentTerminal": true
} it also makes it easier for me to browse other parts of my project because everything's available from within vscode. |
Hello,
I am using basedpyright in vscode and basedpyright is installed in my pixi environmment.
I would like to configure basedpyright to not check for Any type.
It seams there is something wrong with my config because basepyright is still returning error
Type Any is not allowed
The text was updated successfully, but these errors were encountered: