Skip to content

Commit 394435c

Browse files
hubatishcopybara-github
authored andcommitted
Add .pre-commit-config which runs pyink
Copy of #6336 PR by kiryl-filatau There are also existing hooks in https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/tree/master/hooks ..but these look pretty ancient (last change 8 years ago). Will ignore for now & can potentially incorporate some of the useful features (like only running linter on modified files) in the future. PiperOrigin-RevId: 853836176
1 parent d3e2dd7 commit 394435c

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

CHANGES.next.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -431,7 +431,8 @@
431431
- Add support for NVMe local SSDs in GKE.
432432
- Add support for cluster to wait the resource on multiple conditions
433433
- Add support for enabling live migration on AMD SEV
434-
- Increased maintenance simulation notification timeout to 4 hours in maintenance_simulation_trigger.py.
434+
- Increased maintenance simulation notification timeout to 4 hours in
435+
maintenance_simulation_trigger.py.
435436

436437
### Bug fixes and maintenance updates:
437438

@@ -637,3 +638,5 @@
637638
friction for new PRs.
638639
- Support gs:// URLs in --ycsb_tar_url.
639640
- Add `--gce_extra_network_interface_options` flag.
641+
- Add pyink as a precommit hook for GitHub PRs. This was already recommended
642+
practice but is now done automatically.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
repos:
2+
- repo: https://github.com/google/pyink
3+
rev: 24.10.1
4+
hooks:
5+
- id: pyink
6+
language_version: python3.12
7+
args: [--pyink-indentation=2, --pyink-use-majority-quotes, --unstable, --line-length=80]

0 commit comments

Comments
 (0)