Skip to content

MAINT: black .#1164

Merged
larsoner merged 3 commits intosphinx-gallery:masterfrom
larsoner:black
Aug 14, 2023
Merged

MAINT: black .#1164
larsoner merged 3 commits intosphinx-gallery:masterfrom
larsoner:black

Conversation

@larsoner
Copy link
Copy Markdown
Contributor

First step in #1162 -- run black .. One file fails but it has a SyntaxError so this is expected.

I'll mark this for merge-when-green, then open a follow-up PR that does the rest of what's required for #1162:

  1. adds the squash+merged commit hash to git-ignore-revs
  2. adds black to pre-commit
  3. Adds ruff to pre-commit
  4. runs pre-commit ci (should be enabled and show up as green)
  5. adds pre-commit CI as a required CI check

@larsoner larsoner enabled auto-merge (squash) August 13, 2023 18:10
@lucyleeow
Copy link
Copy Markdown
Contributor

Nitpick, maybe we could add to our readme.rst under the 'contributing' section what version of black we use for the code. Just so it's documented somewhere since different versions can format differently. Does not have to be in this PR.

@larsoner
Copy link
Copy Markdown
Contributor Author

Not sure it's worth it with precommit.ci, it'll get out of date fairly often (and we'll have to update it) and if someone happens to use the wrong/older version that didn't format the same the CI will automatically push fixes

@lucyleeow
Copy link
Copy Markdown
Contributor

Yeah good point, sorry missed that we are doing pre-commit. I'm not used to that actually!

@larsoner larsoner merged commit 9f0d05c into sphinx-gallery:master Aug 14, 2023
@larsoner larsoner deleted the black branch August 14, 2023 01:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants