Skip to content

Conversation

@Skylion007
Copy link
Collaborator

@Skylion007 Skylion007 commented Sep 22, 2021

Description

  • Applies blacken-docs and therefore black code formatting to the RST documentation.
  • Applies pycln and removes unused imports.
  • Fixes syntax highlighting blocks that were improperly set.
  • I added the associated pre-commit hooks as well.

Suggested changelog entry:

* Add blacken-docs pre-commit hook
* Add pycln pre-commit hook and remove unused imports 
* Fix highlighting hints and errors in RST docs

@henryiii
Copy link
Collaborator

I'd be fine to add the pinning. Black doesn't really change that fast (or practically at all), so a slightly older docs format is unlikely to clash with the main format. We'd get auto fixes, for example,w with that.

@Skylion007
Copy link
Collaborator Author

@henryiii Okay, I'll add it.

@Skylion007
Copy link
Collaborator Author

@henryiii Yeah, I would feel even better though if someone could add a CI check that checks that version match in the pre-commit.yaml though like we do for other version checks.

@Skylion007 Skylion007 changed the title Apply blacken-docs and fix language-hints Apply blacken-docs, pycln and fix language-hints Sep 22, 2021
@Skylion007 Skylion007 changed the title Apply blacken-docs, pycln and fix language-hints Add blacken-docs, pycln pre-commit and applies fixes Sep 22, 2021
@henryiii
Copy link
Collaborator

I wasn't aware of pycln, looks useful. :)

@Skylion007 Skylion007 changed the title Add blacken-docs, pycln pre-commit and applies fixes Add blacken-docs and pycln pre-commit hooks Sep 22, 2021
@Skylion007
Copy link
Collaborator Author

@henryiii @rwgk Okay, this PR is ready to go unless anyone has objections?

@Skylion007 Skylion007 merged commit 0fb981b into pybind:master Sep 22, 2021
@Skylion007 Skylion007 deleted the blacken_docs_and_fixrst branch September 22, 2021 19:38
@henryiii henryiii mentioned this pull request Oct 21, 2021
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