From b95794b5a5350b13e6136f38975eba498a84fe8c Mon Sep 17 00:00:00 2001 From: David Soria Parra Date: Fri, 11 Oct 2024 10:53:51 +0100 Subject: [PATCH 1/3] pyproject: Add venv to pyproject pyright and Zed use the venv setting in pyright to correctly determine the virtual env to use. --- pyproject.toml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index 4765da85d..7bdda441a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -23,6 +23,8 @@ packages = ["mcp_python"] [tool.pyright] include = ["mcp_python", "tests"] typeCheckingMode = "strict" +venvPath = "." +venv = ".venv" [tool.ruff] select = ["E", "F", "I"] From 8299cd00551d69466de96a58ceafc6d937a86587 Mon Sep 17 00:00:00 2001 From: David Soria Parra Date: Fri, 11 Oct 2024 11:23:31 +0100 Subject: [PATCH 2/3] python-version: Pin our python version Tools like rye and uv use .python version to correctly lock the venv to a certain python version. We are pinning ours to 3.11. --- .python-version | 1 + 1 file changed, 1 insertion(+) create mode 100644 .python-version diff --git a/.python-version b/.python-version new file mode 100644 index 000000000..2c0733315 --- /dev/null +++ b/.python-version @@ -0,0 +1 @@ +3.11 From a05e66b4abfb80729dc8a1caecdba08bfe83a0e3 Mon Sep 17 00:00:00 2001 From: David Soria Parra Date: Fri, 11 Oct 2024 11:31:16 +0100 Subject: [PATCH 3/3] pyproject: Update ruff config to new layout --- pyproject.toml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 7bdda441a..e0cb38bbd 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -26,11 +26,13 @@ typeCheckingMode = "strict" venvPath = "." venv = ".venv" -[tool.ruff] +[tool.ruff.lint] select = ["E", "F", "I"] ignore = [] + +[tool.ruff] line-length = 88 target-version = "py38" -[tool.ruff.per-file-ignores] +[tool.ruff.lint.per-file-ignores] "__init__.py" = ["F401"]