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 rst backticks rule to pygrep-hooks #1626

Closed
wants to merge 4 commits into from

Conversation

martinabeleda
Copy link

Implements RST Backticks rule from #980

@charliermarsh
Copy link
Member

Thanks for this! Is this rule intended to be run on Python code? (Have you used it in practice?) It looks like it's maybe intended to be run on RST directly?

@charliermarsh
Copy link
Member

E.g., I'm not sure that the positive-errors in PGH005_1.py are actually picked up by pre-commit, since the pre-commit regex seems to ignore any lines that start with four spaces.

@martinabeleda
Copy link
Author

Thanks for this! Is this rule intended to be run on Python code? (Have you used it in practice?) It looks like it's maybe intended to be run on RST directly?

Thanks for looking @charliermarsh yeah I was confused about this but raised the PR to get another set of eyes on it. I think you are right that it's not intended to work on indented comments (it looks to be used for linting PEP rst files).

In that case, does it even make sense to add this rule? I was looking for a good first issue but can close this and find another one to work on

@charliermarsh
Copy link
Member

@martinabeleda - Thanks tons for getting involved! Yeah, I think this rule probably doesn't make sense to include. I'm sorry to mislead. I'm gonna go ahead and edit the pygrep issue to remove any RST-specific rules. I wish I'd caught those before!

My top suggestion right now is to take something from the flake8-simplify task. The nice thing is that you can look at the flake8-simplify source for any given rule as a hint on how to implement it. Just comment in the issue if you'd like to work on something there, I'd love your help!

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

Successfully merging this pull request may close these issues.

2 participants