From 8bc9a6536775465280a42745940575d2f5980078 Mon Sep 17 00:00:00 2001 From: Avasam Date: Wed, 12 Mar 2025 08:33:04 -0400 Subject: [PATCH] Allow `uv run` to be used without `--no-project` (#13599) --- .gitignore | 4 +++- pyproject.toml | 7 +++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 4c5c5703e..edd0a9568 100644 --- a/.gitignore +++ b/.gitignore @@ -68,8 +68,10 @@ analyze.py # Mypy cache .mypy_cache/ -# pyenv local python version +# pyenv and uv local python version .python-version +# we don't use uv's lock as we're not actually a project +uv.lock # deliberately local test configuration files stdlib/@tests/stubtest_allowlists/*.local diff --git a/pyproject.toml b/pyproject.toml index 2d6e8f2ea..7adabb9ea 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,3 +1,10 @@ +[project] +# This section is needed to avoid writing --no-project everytime when using "uv run" +# https://github.com/astral-sh/uv/issues/8666 +name = "typeshed" +version = "0" +requires-python = ">=3.9" # Minimum version to run tests, used by uv run + [tool.black] line-length = 130 target-version = ["py310"]