From 8a5fb6757f7b47c1177ab6bebaefb614867a4edd Mon Sep 17 00:00:00 2001 From: Kyle Oliver Date: Mon, 24 Nov 2025 16:30:53 -0500 Subject: [PATCH 1/3] chore: update demo to the latest cookiecutter-robust-python --- pyproject.toml | 2 +- uv.lock | 45 ++++++++++++++++++++++++++++++--------------- 2 files changed, 31 insertions(+), 16 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index a27d507..47e188b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -41,7 +41,7 @@ dev = [ "pip-audit>=2.9.0", "pytest>=8.3.5", "pytest-cov>=6.1.1", - "pyright>=1.1.400", + "basedpyright>=1.34.0", ] docs = [ "furo>=2024.8.6", diff --git a/uv.lock b/uv.lock index b7c5f55..856c1c4 100644 --- a/uv.lock +++ b/uv.lock @@ -72,6 +72,18 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/88/85/db74b9233e0aa27ec96891045c5e920a64dd5cbccd50f8e64e9460f48d35/bandit-1.8.3-py3-none-any.whl", hash = "sha256:28f04dc0d258e1dd0f99dee8eefa13d1cb5e3fde1a5ab0c523971f97b289bcd8", size = 129078, upload-time = "2025-02-17T05:24:54.068Z" }, ] +[[package]] +name = "basedpyright" +version = "1.34.0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "nodejs-wheel-binaries" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/a3/77/ded02ba2b400807b291fa2b9d29ac7f473e86a45d1f5212d8276e9029107/basedpyright-1.34.0.tar.gz", hash = "sha256:7ae3b06f644fac15fdd14a00d0d1f12f92a8205ae1609aabd5a0799b1a68be1d", size = 22803348, upload-time = "2025-11-19T14:48:16.38Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/2a/9e/ced31964ed49f06be6197bd530958b6ddca9a079a8d7ee0ee7429cae9e27/basedpyright-1.34.0-py3-none-any.whl", hash = "sha256:e76015c1ebb671d2c6d7fef8a12bc0f1b9d15d74e17847b7b95a3a66e187c70f", size = 11865958, upload-time = "2025-11-19T14:48:13.724Z" }, +] + [[package]] name = "beautifulsoup4" version = "4.13.4" @@ -668,6 +680,22 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/d2/1d/1b658dbd2b9fa9c4c9f32accbfc0205d532c8c6194dc0f2a4c0428e7128a/nodeenv-1.9.1-py2.py3-none-any.whl", hash = "sha256:ba11c9782d29c27c70ffbdda2d7415098754709be8a7056d79a737cd901155c9", size = 22314, upload-time = "2024-06-04T18:44:08.352Z" }, ] +[[package]] +name = "nodejs-wheel-binaries" +version = "24.11.1" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/e4/89/da307731fdbb05a5f640b26de5b8ac0dc463fef059162accfc89e32f73bc/nodejs_wheel_binaries-24.11.1.tar.gz", hash = "sha256:413dfffeadfb91edb4d8256545dea797c237bba9b3faefea973cde92d96bb922", size = 8059, upload-time = "2025-11-18T18:21:58.207Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/e4/5f/be5a4112e678143d4c15264d918f9a2dc086905c6426eb44515cf391a958/nodejs_wheel_binaries-24.11.1-py2.py3-none-macosx_13_0_arm64.whl", hash = "sha256:0e14874c3579def458245cdbc3239e37610702b0aa0975c1dc55e2cb80e42102", size = 55114309, upload-time = "2025-11-18T18:21:21.697Z" }, + { url = "https://files.pythonhosted.org/packages/fa/1c/2e9d6af2ea32b65928c42b3e5baa7a306870711d93c3536cb25fc090a80d/nodejs_wheel_binaries-24.11.1-py2.py3-none-macosx_13_0_x86_64.whl", hash = "sha256:c2741525c9874b69b3e5a6d6c9179a6fe484ea0c3d5e7b7c01121c8e5d78b7e2", size = 55285957, upload-time = "2025-11-18T18:21:27.177Z" }, + { url = "https://files.pythonhosted.org/packages/d0/79/35696d7ba41b1bd35ef8682f13d46ba38c826c59e58b86b267458eb53d87/nodejs_wheel_binaries-24.11.1-py2.py3-none-manylinux_2_28_aarch64.whl", hash = "sha256:5ef598101b0fb1c2bf643abb76dfbf6f76f1686198ed17ae46009049ee83c546", size = 59645875, upload-time = "2025-11-18T18:21:33.004Z" }, + { url = "https://files.pythonhosted.org/packages/b4/98/2a9694adee0af72bc602a046b0632a0c89e26586090c558b1c9199b187cc/nodejs_wheel_binaries-24.11.1-py2.py3-none-manylinux_2_28_x86_64.whl", hash = "sha256:cde41d5e4705266688a8d8071debf4f8a6fcea264c61292782672ee75a6905f9", size = 60140941, upload-time = "2025-11-18T18:21:37.228Z" }, + { url = "https://files.pythonhosted.org/packages/d0/d6/573e5e2cba9d934f5f89d0beab00c3315e2e6604eb4df0fcd1d80c5a07a8/nodejs_wheel_binaries-24.11.1-py2.py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:78bc5bb889313b565df8969bb7423849a9c7fc218bf735ff0ce176b56b3e96f0", size = 61644243, upload-time = "2025-11-18T18:21:43.325Z" }, + { url = "https://files.pythonhosted.org/packages/c7/e6/643234d5e94067df8ce8d7bba10f3804106668f7a1050aeb10fdd226ead4/nodejs_wheel_binaries-24.11.1-py2.py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:c79a7e43869ccecab1cae8183778249cceb14ca2de67b5650b223385682c6239", size = 62225657, upload-time = "2025-11-18T18:21:47.708Z" }, + { url = "https://files.pythonhosted.org/packages/4d/1c/2fb05127102a80225cab7a75c0e9edf88a0a1b79f912e1e36c7c1aaa8f4e/nodejs_wheel_binaries-24.11.1-py2.py3-none-win_amd64.whl", hash = "sha256:10197b1c9c04d79403501766f76508b0dac101ab34371ef8a46fcf51773497d0", size = 41322308, upload-time = "2025-11-18T18:21:51.347Z" }, + { url = "https://files.pythonhosted.org/packages/ad/b7/bc0cdbc2cc3a66fcac82c79912e135a0110b37b790a14c477f18e18d90cd/nodejs_wheel_binaries-24.11.1-py2.py3-none-win_arm64.whl", hash = "sha256:376b9ea1c4bc1207878975dfeb604f7aa5668c260c6154dcd2af9d42f7734116", size = 39026497, upload-time = "2025-11-18T18:21:54.634Z" }, +] + [[package]] name = "nox" version = "2025.5.1" @@ -859,19 +887,6 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/05/e7/df2285f3d08fee213f2d041540fa4fc9ca6c2d44cf36d3a035bf2a8d2bcc/pyparsing-3.2.3-py3-none-any.whl", hash = "sha256:a749938e02d6fd0b59b356ca504a24982314bb090c383e3cf201c95ef7e2bfcf", size = 111120, upload-time = "2025-03-25T05:01:24.908Z" }, ] -[[package]] -name = "pyright" -version = "1.1.401" -source = { registry = "https://pypi.org/simple" } -dependencies = [ - { name = "nodeenv" }, - { name = "typing-extensions" }, -] -sdist = { url = "https://files.pythonhosted.org/packages/79/9a/7ab2b333b921b2d6bfcffe05a0e0a0bbeff884bd6fb5ed50cd68e2898e53/pyright-1.1.401.tar.gz", hash = "sha256:788a82b6611fa5e34a326a921d86d898768cddf59edde8e93e56087d277cc6f1", size = 3894193, upload-time = "2025-05-21T10:44:52.03Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/0d/e6/1f908fce68b0401d41580e0f9acc4c3d1b248adcff00dfaad75cd21a1370/pyright-1.1.401-py3-none-any.whl", hash = "sha256:6fde30492ba5b0d7667c16ecaf6c699fab8d7a1263f6a18549e0b00bf7724c06", size = 5629193, upload-time = "2025-05-21T10:44:50.129Z" }, -] - [[package]] name = "pytest" version = "8.3.5" @@ -1001,12 +1016,12 @@ dependencies = [ [package.dev-dependencies] dev = [ { name = "bandit" }, + { name = "basedpyright" }, { name = "commitizen" }, { name = "nox" }, { name = "pip-audit" }, { name = "pre-commit" }, { name = "pre-commit-hooks" }, - { name = "pyright" }, { name = "pytest" }, { name = "pytest-cov" }, { name = "ruff" }, @@ -1036,12 +1051,12 @@ requires-dist = [ [package.metadata.requires-dev] dev = [ { name = "bandit", specifier = ">=1.8.3" }, + { name = "basedpyright", specifier = ">=1.34.0" }, { name = "commitizen", specifier = ">=4.7.0" }, { name = "nox", specifier = ">=2025.5.1" }, { name = "pip-audit", specifier = ">=2.9.0" }, { name = "pre-commit", specifier = ">=4.2.0" }, { name = "pre-commit-hooks", specifier = ">=5.0.0" }, - { name = "pyright", specifier = ">=1.1.400" }, { name = "pytest", specifier = ">=8.3.5" }, { name = "pytest-cov", specifier = ">=6.1.1" }, { name = "ruff", specifier = ">=0.11.9" }, From 3b86b8a140ec8a4e7526d6dca29f5d83fcec36f0 Mon Sep 17 00:00:00 2001 From: Kyle Oliver Date: Mon, 24 Nov 2025 16:31:47 -0500 Subject: [PATCH 2/3] chore: update demo to the latest cookiecutter-robust-python --- .cookiecutter.json | 2 +- .cruft.json | 4 ++-- .github/workflows/build-docs.yml | 2 +- .gitignore | 3 ++- .vscode/extensions.json | 2 +- .vscode/settings.json | 2 +- CONTRIBUTING.md | 5 +++-- noxfile.py | 12 +++--------- pyrightconfig.json | 6 ++++-- 9 files changed, 18 insertions(+), 20 deletions(-) diff --git a/.cookiecutter.json b/.cookiecutter.json index cb7a7cf..4291da6 100644 --- a/.cookiecutter.json +++ b/.cookiecutter.json @@ -1,5 +1,5 @@ { - "_commit": "b36862f08dac62022ba33f94c31be4bac4181340", + "_commit": "a2d5945a169185d37abe3b1eaad1871ece5d9eec", "_max_python_version_minor_int": 14, "_min_python_version_minor_int": 10, "_template": "C:\\Users\\56kyl\\source\\repos\\cookiecutter-robust-python", diff --git a/.cruft.json b/.cruft.json index 135b771..3794afe 100644 --- a/.cruft.json +++ b/.cruft.json @@ -1,6 +1,6 @@ { "template": "C:\\Users\\56kyl\\source\\repos\\cookiecutter-robust-python", - "commit": "b36862f08dac62022ba33f94c31be4bac4181340", + "commit": "a2d5945a169185d37abe3b1eaad1871ece5d9eec", "checkout": null, "context": { "cookiecutter": { @@ -20,7 +20,7 @@ "license": "MIT", "development_status": "Development Status :: 1 - Planning", "_template": "C:\\Users\\56kyl\\source\\repos\\cookiecutter-robust-python", - "_commit": "b36862f08dac62022ba33f94c31be4bac4181340", + "_commit": "a2d5945a169185d37abe3b1eaad1871ece5d9eec", "_min_python_version_minor_int": 10, "_max_python_version_minor_int": 14, "python_versions": [ diff --git a/.github/workflows/build-docs.yml b/.github/workflows/build-docs.yml index c0f80c0..a5c3457 100644 --- a/.github/workflows/build-docs.yml +++ b/.github/workflows/build-docs.yml @@ -12,7 +12,7 @@ on: - "pyproject.toml" - ".github/workflows/build-docs.yml" - ".ruff.toml" # Affects docstrings via linting - - "pyrightconfig.json" # Affects type hints in docs + - "pyrightconfig.json" # Basedpyright config - affects type hints in docs push: branches: diff --git a/.gitignore b/.gitignore index 9fced39..046acd4 100644 --- a/.gitignore +++ b/.gitignore @@ -56,8 +56,9 @@ Thumbs.db # Windows thumbnail cache # MyPy cache (if used standalone or by IDE) .mypy_cache/ -# Pyright cache +# Pyright/Basedpyright cache .pyright/ +.basedpyright/ # Ruff cache .ruff_cache/ diff --git a/.vscode/extensions.json b/.vscode/extensions.json index f2607f4..e2d1e44 100644 --- a/.vscode/extensions.json +++ b/.vscode/extensions.json @@ -4,7 +4,7 @@ "ms-python.python", "ms-python.vscode-pylance", "charliermarsh.ruff", - "ms-pyright.pyright", + "detachhead.basedpyright", // Git + pre-commit workflow "ryanluker.vscode-pre-commit", diff --git a/.vscode/settings.json b/.vscode/settings.json index 8882727..97ac959 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -14,7 +14,7 @@ "ruff.args": ["--config", "${workspaceFolder}/.ruff.toml"], "python.linting.enabled": true, "python.linting.ruffEnabled": true, - // Pyright + // Basedpyright "python.analysis.typeCheckingMode": "basic", // Pytest diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 98a4fac..1cf2bda 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -121,7 +121,7 @@ This project follows these standards: - **Code formatting:** [Ruff][ruff-documentation] (automatically applied by pre-commit) - **Linting:** Ruff with comprehensive rule set -- **Type checking:** [Pyright][pyright-documentation] +- **Type checking:** [Basedpyright][basedpyright-documentation] - **Security:** [Bandit][bandit-documentation] for security linting - **Commit messages:** [Conventional Commits][conventional-commits] format preferred - **Testing:** [pytest][pytest-documentation] with good coverage @@ -168,7 +168,7 @@ Common Nox sessions for development: # Code quality uvx nox -s format-python # Format with Ruff uvx nox -s lint-python # Lint with Ruff -uvx nox -s typecheck # Type check with Pyright +uvx nox -s typecheck # Type check with Basedpyright uvx nox -s security-python # Security checks # Testing @@ -206,6 +206,7 @@ _This project was generated from the [cookiecutter-robust-python][cookiecutter-r [discussions]: https://github.com/56kyle/robust-python-demo/discussions [uv-documentation]: https://docs.astral.sh/uv/ [ruff-documentation]: https://docs.astral.sh/ruff/ +[basedpyright-documentation]: https://github.com/detachhead/basedpyright [pyright-documentation]: https://github.com/microsoft/pyright [bandit-documentation]: https://bandit.readthedocs.io/ [conventional-commits]: https://www.conventionalcommits.org/ diff --git a/noxfile.py b/noxfile.py index 9043038..a87ae88 100644 --- a/noxfile.py +++ b/noxfile.py @@ -14,13 +14,7 @@ nox.options.default_venv_backend = "uv" os.environ.setdefault("PYO3_USE_ABI3_FORWARD_COMPATIBILITY", "1") -# Logic that helps avoid metaprogramming in cookiecutter-robust-python -MIN_PYTHON_VERSION_SLUG: int = int("3.10".lstrip("3.")) -MAX_PYTHON_VERSION_SLUG: int = int("3.14".lstrip("3.")) - -PYTHON_VERSIONS: List[str] = [ - f"3.{VERSION_SLUG}" for VERSION_SLUG in range(MIN_PYTHON_VERSION_SLUG, MAX_PYTHON_VERSION_SLUG + 1) -] +PYTHON_VERSIONS: List[str] = ['3.10', '3.11', '3.12', '3.13', '3.14'] DEFAULT_PYTHON_VERSION: str = PYTHON_VERSIONS[-1] REPO_ROOT: Path = Path(__file__).parent.resolve() @@ -102,11 +96,11 @@ def lint_python(session: Session) -> None: @nox.session(python=PYTHON_VERSIONS, name="typecheck") def typecheck(session: Session) -> None: - """Run static type checking (Pyright) on Python code.""" + """Run static type checking (Basedpyright) on Python code.""" session.log("Installing type checking dependencies...") session.install("-e", ".", "--group", "dev") - session.log(f"Running Pyright check with py{session.python}.") + session.log(f"Running Basedpyright check with py{session.python}.") session.run("pyright", "--pythonversion", session.python) diff --git a/pyrightconfig.json b/pyrightconfig.json index ba7ffda..45eaad7 100644 --- a/pyrightconfig.json +++ b/pyrightconfig.json @@ -32,8 +32,10 @@ "reportPropertyTypeMismatch": "warning", "reportReturnTypeFromAnnotation": "warning", "reportMissingReturnType": "warning", - "basic": true, "reportMissingParameterType": "warning", "reportOptionalOperand": "warning", - "pythonVersion": "3.10" + "pythonVersion": "3.10", + + "reportAny": "error", + "reportExplicitAny": "warning" } From b8d531e20344ad068c43056b77835ae9fa97f294 Mon Sep 17 00:00:00 2001 From: Kyle Oliver Date: Mon, 24 Nov 2025 16:34:02 -0500 Subject: [PATCH 3/3] =?UTF-8?q?bump:=20version=200.33.0=20=E2=86=92=200.34?= =?UTF-8?q?.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 2 ++ pyproject.toml | 2 +- uv.lock | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b819c75..2e594b8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,5 @@ +## v0.34.0 (2025-11-24) + ## v0.33.0 (2025-11-17) ## v0.32.0 (2025-11-17) diff --git a/pyproject.toml b/pyproject.toml index 47e188b..f85f5fa 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "robust-python-demo" -version = "0.33.0" +version = "0.34.0" description = "robust-python-demo" authors = [ { name = "Kyle Oliver", email = "56kyleoliver+cookiecutter-robust-python@gmail.com" }, diff --git a/uv.lock b/uv.lock index 856c1c4..dc2e761 100644 --- a/uv.lock +++ b/uv.lock @@ -1004,7 +1004,7 @@ wheels = [ [[package]] name = "robust-python-demo" -version = "0.33.0" +version = "0.34.0" source = { editable = "." } dependencies = [ { name = "loguru" },