FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

MNT: Update pre-commit hooks by matthewfeickert · Pull Request #24196 · matplotlib/matplotlib · GitHub

Repository navigation

MNT: Update pre-commit hooks - #24196

Merged
QuLogic merged 3 commits into
matplotlib:mainfrom
matthewfeickert:mnt/update-pre-commit-hooks
Oct 20, 2022
Merged

QuLogic merged 3 commits into
matplotlib:mainfrom
matthewfeickert:mnt/update-pre-commit-hooks

Conversation

matthewfeickert commented Oct 17, 2022 •
edited
Loading

Copy link
Copy Markdown
Contributor

PR Summary

Update the codespell pre-commit hook, and while doing so also update the flake8 pre-commit hook.

Note that this PR would eventually be done by the quarterly update, and so feel free to close if you'd prefer to wait for that, but this takes care of additional updates now.

Follow up PR to PR #22809.

Closes #24086

PR Checklist

Tests and Styling

  • [N/A] Has pytest style unit tests (and pytest passes).
  • Is Flake 8 compliant (install flake8-docstrings and run flake8 --docstring-convention=all).

Documentation

  • [N/A] New features are documented, with examples if plot related.
  • [N/A] New features have an entry in doc/users/next_whats_new/ (follow instructions in README.rst there).
  • [N/A] API changes documented in doc/api/next_api_changes/ (follow instructions in README.rst there).
  • [N/A] Documentation is sphinx and numpydoc compliant (the docs should build without error).

matthewfeickert left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Summary of why each of these changes is applied:

cannotation
coo
curvelinear
dedented

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Use in

dedented docstring; additional replacements can by given in *doc_sub*.

is reasonable so adding to ignore.

coo
curvelinear
dedented
falsy

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Falsy is how Python spells it, so adding.

dedented
falsy
flate
hax

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Use in

fig, (vax, hax) = plt.subplots(1, 2, figsize=(12, 6))

for "horizontal axis" is reasonable, so added. However, if it would be preferable to make the example variables more explicit and verbose I can edit them instead.

flate
hax
hist
inh

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Use in

inl, inb, inw, inh = self._boxin.bounds

for "invalid height" is reasonable, so added.

Comment thread ci/codespell-ignore-words.txt Outdated
nd
oly
sur
resizeable

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Use in

artist resizeable, moveable, highlightable, and selectable as desired

is a valid spelling, and so adding to ignore file.

sur is removed as added to the codespell dictionary in v2.2.0. c.f. codespell-project/codespell#2300

Copy link
Copy Markdown
Contributor Author

As this is a follow up to PR #22809, then tagging @oscargus, @greglucas, @jklymak, and @QuLogic for possible reviewers.

oscargus left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Looks good! Replaces #24086?

matthewfeickert commented Oct 17, 2022 •
edited
Loading

Copy link
Copy Markdown
Contributor Author

Looks good! Replaces #24086?

oh woops! I missed this, sorry @oscargus. Yes, I can either add to the PR body that this will close it or if it would be preferred we can port the additional updates and codespell changes from here over to that PR — your call.

Copy link
Copy Markdown
Member

To me it seems like just closing #24086 when this is merged would be the way to go.
(Unless the pre-commit-ci-bot thinks it is a bad idea for some unknown reason...)

matthewfeickert commented Oct 17, 2022 •
edited
Loading

Copy link
Copy Markdown
Contributor Author

That's totally fine! The pre-commit.ci bot doesn't care at all. I'll just be better in the future about checking for those PRs before opening another one. I've updated the PR body to close PR #24086 automatically now.

* github.com/pycqa/flake8: v4.0.1 → v5.0.4
* github.com/codespell-project/codespell: v2.1.0 → v2.2.2
* Use 'name' to additionally avoid codespell failure.
Ignore instances of:
* 'dedented', 'resizeable'
* 'falsy' for Falsy in Python
* 'hax' for horizontal axis
* 'inh' for invalid height

Remove ignore of 'sur' as it is in codespell's dictionary as of v2.2.0.
   - c.f. https://github.com/codespell-project/codespell/releases/tag/v2.2.0
matthewfeickert force-pushed the mnt/update-pre-commit-hooks branch from 7e2b17c to b41e130 Compare October 19, 2022 07:11
QuLogic merged commit aaa5129 into matplotlib:main Oct 20, 2022
QuLogic added this to the v3.7.0 milestone Oct 20, 2022
matthewfeickert deleted the mnt/update-pre-commit-hooks branch October 20, 2022 06:47
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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.

3 participants


Back | FazBrowse Home | New Git URL