You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When modifying a pyproject.toml in a subfolder ruff does correctly handle this as a cache bust. The same modification of the root level pyproject.toml causes a cache bust.
The setup can be recreated with this script:
#!/bin/bash# Create root pyproject.toml
cat <<EOF > pyproject.toml[tool.ruff.lint]select = []EOF# Create lib directory and its pyproject.toml
mkdir lib
cat <<EOF > lib/pyproject.toml[tool.ruff.lint]select = []EOF# Create a Python file with a hello world function# It violates ANN rules
cat <<EOF > lib/hello.pydef hello_world(): print("Hello, World!")EOF# Run ruff checkecho"Running initial ruff check:"
ruff check
# Modify lib/pyproject.toml
cat <<EOF > lib/pyproject.toml[tool.ruff.lint]select = ["ANN"]EOF# Run ruff check again - it works due to a cache hitecho"Running ruff check after modification:"
ruff check
# Ruff check without cache will failecho"Running ruff check without cache"
ruff check --no-cache
Output:
Running initial ruff check:
All checks passed!
Running ruff check after modification:
All checks passed!
Running ruff check without cache
lib/hello.py:1:5: ANN201 Missing returntype annotation for public function`hello_world`|
1 | def hello_world():
| ^^^^^^^^^^^ ANN201
2 | print("Hello, World!")
|
= help: Add returntype annotation: `None`
Found 1 error.
No fixes available (1 hidden fix can be enabled with the `--unsafe-fixes` option).
Tested with ruff 0.5.6.
Searched for different combinations of these keywords and have not found an existing issue: cache pyproject.toml subfolder --no-cache subproject
The text was updated successfully, but these errors were encountered:
AlexWaygood
changed the title
Chnages in sub pyproject.toml do not cause a cache bust
Changes in sub pyproject.toml do not cause a cache bust
Aug 6, 2024
When modifying a
pyproject.toml
in a subfolder ruff does correctly handle this as a cache bust. The same modification of the root levelpyproject.toml
causes a cache bust.The setup can be recreated with this script:
Output:
Tested with
ruff 0.5.6
.Searched for different combinations of these keywords and have not found an existing issue: cache pyproject.toml subfolder --no-cache subproject
The text was updated successfully, but these errors were encountered: