Title: STY: Apply pre-commit hooks to codebase by matthewfeickert · Pull Request #22809 · matplotlib/matplotlib · GitHub
Open Graph Title: STY: Apply pre-commit hooks to codebase by matthewfeickert · Pull Request #22809 · matplotlib/matplotlib
X Title: STY: Apply pre-commit hooks to codebase by matthewfeickert · Pull Request #22809 · matplotlib/matplotlib
Description: PR Summary This is a follow up PR to PR #21583 based on discussions in PR #22777 (c.f. #22777 (comment)) and on Gitter. This touches a lot of files so I'll walk through the story here, which should help motivate turning on pre-commit.ci. The pre-commit hooks were added in PR #21583 (November 2021) with a pre-commit.ci matplotlib/.pre-commit-config.yaml Line 3 in a436253 autoupdate_schedule: 'quarterly' though as pre-commit.ci wasn't turned on, there were no pre-commit hook updates coming in on that schedule and so I've run pre-commit autoupdate to update the pre-commit-hooks and flake8 ids. With those updated, I then ran the failing (c.f. #22777 (comment)) pre-commit hooks and applied their necessary revisions as individual commits. So those are the style commits for end-of-file-fixer, trailing-whitespace, and check-docstring-first. These were also done as individual commits so that if in review any of these are viewed as not acceptable they can be dropped easily with a rebase. As the following commits touch many files, this is a noisy first time run of the hooks. To help limit this, add a .git-blame-ignore-revs file that will automatically ignore commits in the blame view on GitHub (this file is required to be in the top level of the repo). This can also be done locally with git blame by running git blame --ignore-revs-file .git-blame-ignore-revs Example on my fork: Note to reviewer: As this file contains commits it is sensitive to rebases, and so please make sure that these commits are correct if anyone rebases this during review. This PR should probably be merged in advance of PR #22777 which can be trivially rebased and would be a good time to turn pre-commit.ci on. pre-commit now passes the full repo: $ pre-commit run --all-files check for added large files..............................................Passed check docstring is first.................................................Passed fix end of files.........................................................Passed mixed line ending........................................................Passed trim trailing whitespace.................................................Passed flake8...................................................................Passed PR Checklist Tests and Styling 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). Documentation is sphinx and numpydoc compliant (the docs should build without error).
Open Graph Description: PR Summary This is a follow up PR to PR #21583 based on discussions in PR #22777 (c.f. #22777 (comment)) and on Gitter. This touches a lot of files so I'll walk through the story here, which sh...
X Description: PR Summary This is a follow up PR to PR #21583 based on discussions in PR #22777 (c.f. #22777 (comment)) and on Gitter. This touches a lot of files so I'll walk through the story here, whic...
Opengraph URL: https://github.com/matplotlib/matplotlib/pull/22809
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:40c5db59-0ac0-9445-2562-e7acfb329477 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | C88A:620C2:18B7D5E:20B18E0:6A51D089 |
| html-safe-nonce | 9d4ec79064cf53df369afe6ffcb87bcdfc2f55d65019f147d9f7052e941fe34a |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDODhBOjYyMEMyOjE4QjdENUU6MjBCMThFMDo2QTUxRDA4OSIsInZpc2l0b3JfaWQiOiI4MTgxOTc1NjY0ODg0MzA2MDU4IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 590ef95f17f55d44035042131e2659fbf9669dd4175d2ff586dfd633e0ca77af |
| hovercard-subject-tag | pull_request:904253903 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/matplotlib/matplotlib/pull/22809/files |
| twitter:image | https://avatars.githubusercontent.com/u/5142394?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/5142394?s=400&v=4 |
| og:image:alt | PR Summary This is a follow up PR to PR #21583 based on discussions in PR #22777 (c.f. #22777 (comment)) and on Gitter. This touches a lot of files so I'll walk through the story here, which sh... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | b9a586c06a05a7a86fc7e3f4dbd03e42f6869085879aa184aa6369456dbd50fb |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/matplotlib/matplotlib git https://github.com/matplotlib/matplotlib.git |
| octolytics-dimension-user_id | 215947 |
| octolytics-dimension-user_login | matplotlib |
| octolytics-dimension-repository_id | 1385122 |
| octolytics-dimension-repository_nwo | matplotlib/matplotlib |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 1385122 |
| octolytics-dimension-repository_network_root_nwo | matplotlib/matplotlib |
| turbo-body-classes | logged-out env-production page-responsive full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 7aed05249554b889eb33d002851a973eebcc7e91 |
| ui-target | canary-2 |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width