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

The show-source deprecation warning should have a clearer call to action #9876

Closed
zanieb opened this issue Feb 7, 2024 · 5 comments
Closed
Labels
good first issue Good for newcomers

Comments

@zanieb
Copy link
Member

zanieb commented Feb 7, 2024

"Please update your configuration" should be more specific.

Raised in #9874

@zanieb zanieb added the good first issue Good for newcomers label Feb 7, 2024
@AbhinavMir
Copy link

AbhinavMir commented Feb 11, 2024

Hi @zanieb - love Ruff, would love to contribute.

What's a good replacement?

Current message: show-source is deprecated and is now part of output-format in the form of full or concise options. Please update your configuration.

Modified message: show-source is deprecated and is now part of output-format in the form of full or concise options. Please update your configuration by replacing show-source with either output-format = full for viewing source code or output-format = concise (set as the default) for not showing source. This can be done in your configuration file.

@zanieb
Copy link
Member Author

zanieb commented Feb 11, 2024

Hey @AbhinavMir! Love to hear that :)

I don't think we need to be quite so verbose. I haven't given the exact message a lot of thought but here are some ideas. This is a bit more work, but we should actually be able to tell which value they're using so if they use show-source=true we can say

The show-source option has been deprecated. Use output-format=full instead.

and for show-source=false we can say

The show-source option has been deprecated. Use output-format=text instead.

We may also be able to tell if this was provided via the CLI or a configuration file. If so, we can make even better suggestions e.g.

The show-source option has been deprecated. Update your configuration file to use output-format = text instead.

and

The --show-source option has been deprecated. Use --output-format=full instead.

@AbhinavMir
Copy link

Gotcha, I can probably prod into the code a bit more tomorrow, but it'd be great if you could point out where the options are being read from. The idea, I assume is, read the flags, show the correct output - but just wondering how this is architectured in the code base.

@dylwil3
Copy link
Collaborator

dylwil3 commented Jul 12, 2024

Should this issue be closed in light of #9814, which removes show-source as an option (along with its deprecation warning)?

@zanieb zanieb closed this as completed Jul 12, 2024
@zanieb
Copy link
Member Author

zanieb commented Jul 12, 2024

Thanks!

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

No branches or pull requests

3 participants