Skip to content

Commit 0fd107e

Browse files
committed
pre-commit: Add pyupgrade hook
Another day, another useful hook. We also ignore the preceding patch that actually did the work, renaming the incorrect named file in the process. Change-Id: I412827761fbdeb36702ebaf5c1b727c62e629299 Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
1 parent c5b772d commit 0fd107e

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# You can configure git to automatically use this file with the following config:
22
# git config --global blame.ignoreRevsFile .git-blame-ignore-revs
33

4+
c5b772db76c071e493a81105c7d8c0def08b2264 # trivial: Prepare for pyupgrade pre-commit hook
45
ed0314ac76ae58a6621077feb742efd5c14c3a62 # Blacken everything else
56
ac64fdb93c32972575a4523ccb23d0279ef584f5 # Blacken openstackclient.api
67
a3778109d0051a25901569e7bafe54915ab25f82 # Blacken openstack.common

.pre-commit-config.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,11 @@ repos:
1717
- id: check-yaml
1818
files: .*\.(yaml|yml)$
1919
args: ['--unsafe']
20+
- repo: https://github.com/asottile/pyupgrade
21+
rev: v3.15.2
22+
hooks:
23+
- id: pyupgrade
24+
args: ['--py38-plus']
2025
- repo: https://github.com/psf/black
2126
rev: 24.4.0
2227
hooks:

0 commit comments

Comments
 (0)