From d25ce3a7e69627d446b6abc88ce07bed2291174a Mon Sep 17 00:00:00 2001 From: Ivan Leo Date: Wed, 25 Dec 2024 18:45:03 +0800 Subject: [PATCH] fix: updating pyright --- pyproject.toml | 33 +++++++++++++++++---------------- uv.lock | 2 +- 2 files changed, 18 insertions(+), 17 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 33844684d..3430e49c8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,18 +1,3 @@ -[tool.pyright] -include = ["instructor"] -exclude = [ - "**/node_modules", - "**/__pycache__", - "src/experimental", - "src/typestubs", - "**/tests/**", -] -pythonVersion = "3.9" -typeCheckingMode = "strict" -# Allow "redundant" runtime type-checking. -reportUnnecessaryIsInstance = "none" -reportUnnecessaryTypeIgnoreComment = "error" - [project] authors = [ {name = "Jason Liu", email = "jason@jxnl.co"}, @@ -40,6 +25,22 @@ readme = "README.md" [project.urls] repository = "https://github.com/jxnl/instructor" +[tool.pyright] +include = ["instructor"] +exclude = [ + "**/node_modules", + "**/__pycache__", + "src/experimental", + "src/typestubs", + "**/tests/**", +] + +reportMissingImports = "error" +reportMissingTypeStubs = false + +pythonVersion = "3.9" +pythonPlatform = "Linux" + [project.optional-dependencies] test-docs = [ "fastapi<0.116.0,>=0.109.2", @@ -87,7 +88,7 @@ dev = [ "pytest<9.0.0,>=8.3.3", "pytest-asyncio<1.0.0,>=0.24.0", "coverage<8.0.0,>=7.3.2", - "pyright<2.0.0,>=1.1.360", + "pyright<2.0.0", "jsonref<2.0.0,>=1.1.0", "black<25.0.0,>=24.10.0", ] diff --git a/uv.lock b/uv.lock index d319b8ff7..300ce9f01 100644 --- a/uv.lock +++ b/uv.lock @@ -1748,7 +1748,7 @@ dev = [ { name = "black", specifier = ">=24.10.0,<25.0.0" }, { name = "coverage", specifier = ">=7.3.2,<8.0.0" }, { name = "jsonref", specifier = ">=1.1.0,<2.0.0" }, - { name = "pyright", specifier = ">=1.1.360,<2.0.0" }, + { name = "pyright", specifier = "<2.0.0" }, { name = "pytest", specifier = ">=8.3.3,<9.0.0" }, { name = "pytest-asyncio", specifier = ">=0.24.0,<1.0.0" }, ]