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

Add flag for syntax checking of doctests as in flake8 --doctests #3542

Open
marcinbarczynski opened this issue Mar 15, 2023 · 6 comments
Open
Labels
core Related to core functionality linter Related to the linter

Comments

@marcinbarczynski
Copy link

Currently, there is no way to force ruff to check the syntax of doctests.

@charliermarsh charliermarsh added the core Related to core functionality label Mar 15, 2023
@charliermarsh
Copy link
Member

Agreed.

@charliermarsh
Copy link
Member

Should we be checking these by default?

@marcinbarczynski
Copy link
Author

IMO yes.

@jamesbraza
Copy link
Contributor

For flake8 --doctests: https://flake8.pycqa.org/en/latest/user/options.html#cmdoption-flake8-doctests

I believe doctests = False is the default in flake8.

+1 to this request, I also think it should be the default for both flake8 and ruff

@tqa236
Copy link

tqa236 commented Mar 19, 2024

Hello, we are also interested in this feature, especially when the code in docstring can be formatted with ruff already. Is there any plan to implement this feature soon?

@dhruvmanila dhruvmanila added cli Related to the command-line interface linter Related to the linter labels Mar 20, 2024
@dhruvmanila
Copy link
Member

Is there any plan to implement this feature soon?

We're interested in adding support to lint and format embedded Python code in general. It's just we're a small team and currently we have our hands full with other tasks, but we'll notify once we start work on this.

Related #8237

@dhruvmanila dhruvmanila removed the cli Related to the command-line interface label Mar 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Related to core functionality linter Related to the linter
Projects
None yet
Development

No branches or pull requests

5 participants