Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ruff.toml has dependency on extant pyproject.toml #155

Open
jaraco opened this issue Dec 24, 2024 · 1 comment
Open

ruff.toml has dependency on extant pyproject.toml #155

jaraco opened this issue Dec 24, 2024 · 1 comment

Comments

@jaraco
Copy link
Owner

jaraco commented Dec 24, 2024

In #119, we added a new extend = "pyproject.toml" directive in order to work-around the ruff limitation that it cannot infer a target Python version unless the pyproject.toml is included.

Today, I learned that causes other problems downstream when I attempt to use that ruff.toml in other contexts, such as in the coherent system. In that system, ruff.toml isn't managed per-project, but is managed by the system and is shared across projects. In my environments, I'm relying on the presence of a copy of the skeleton's ruff.toml in ~ so that it applies to coherent projects.

However, with the introduction of this new setting, those projects are no longer capable of running ruff, because the extend = "pyproject.toml" fails when there is no pyproject.toml:

ruff failed
  Cause: Failed to read /Users/jaraco/pyproject.toml
  Cause: No such file or directory (os error 2)

This is yet another case where the astral-sh/ruff#10299 is not honoring the user's intentions, but it wouldn't be a problem if ruff could rely on standards metadata instead of expecting to find the metadata in a particular file.

@jaraco
Copy link
Owner Author

jaraco commented Dec 24, 2024

Another degree of workaround may be possible here - to have a ruff.toml in the skeleton that extends a common ruff toml config and pyproject.toml... and then the coherent system could use the common ruff toml config. But, yuck!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant