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

Improve debug printing for resolving origin of config settings #8729

Merged

Conversation

chan-vince
Copy link
Contributor

Summary

When running ruff in verbose mode with -v, the first debug logs show where the config settings are taken from. For example:

❯ ruff check ./some_file.py -v
[2023-11-17][00:16:25][ruff_cli::resolve][DEBUG] Using pyproject.toml (parent) at /Users/vince/demo/ruff.toml

This threw me off for a second because I knew I had no python project there, and therefore no pyproject.toml file. Then I realised it was actually reading a ruff.toml file (obvious when you read the whole print I suppose) and that the pyproject.toml is a hardcoded string in the debug log.

I think it would be nice to tweak the wording slightly so it is clear that the settings don't neccessarily have to come from a pyproject.toml file.

Test Plan

Copy link
Contributor

github-actions bot commented Nov 17, 2023

ruff-ecosystem results

Linter (stable)

✅ ecosystem check detected no linter changes.

Linter (preview)

✅ ecosystem check detected no linter changes.

Copy link
Member

@charliermarsh charliermarsh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@charliermarsh charliermarsh added the cli Related to the command-line interface label Nov 17, 2023
@charliermarsh charliermarsh enabled auto-merge (squash) November 17, 2023 01:05
@charliermarsh charliermarsh merged commit e2109c1 into astral-sh:main Nov 17, 2023
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cli Related to the command-line interface
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants