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
in my projects's pyproject.toml, I configure the cache-dir
[tool.ruff]
# ruff searches for settings in the target-dir and up
# https://beta.ruff.rs/docs/configuration/
cache-dir = "var/cache/ruff" # relative to $PWD
when setting a relative path in pyproject.toml,
the setting should be relative to that pyproject.toml-file.
however, ruff takes it relative to the $PWD, which does not make sense in a configfile.
when I run ruff from my project-directory, it creates cache-dirs in every location I run ruff from:
I don't think it should be relative to the configuration file in all cases (though it's probably not worth going into why), but it should be relative to the "project root" which is typically the directory containing the configuration file.
In the above case, we should be choosing the top-level directory as the project root in all cases, and so using that same top-level var/cache/ruff/, so seems like a bug.
## Summary
Unlike other filepath-based settings, the `cache-dir` wasn't being
resolved relative to the project root, when specified as an absolute
path.
Closes#7958.
using ruff 0.0.292
in my projects's pyproject.toml, I configure the cache-dir
when setting a relative path in pyproject.toml,
the setting should be relative to that pyproject.toml-file.
however, ruff takes it relative to the $PWD, which does not make sense in a configfile.
when I run ruff from my project-directory, it creates cache-dirs in every location I run ruff from:
The text was updated successfully, but these errors were encountered: