aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoe Baker-Malone <jbakermalone@google.com>2022-05-19 12:34:59 -0700
committerJoe Baker-Malone <jbakermalone@google.com>2022-05-19 20:14:39 +0000
commit4be02792bbb13cc68baafb410ab63b236889bb26 (patch)
treef3ccdf81e23568a951395aa205856f3a46187ae5
parent1d76f6acb38b9c5e03b8799c9d99a0aad370d6d1 (diff)
downloadrepohooks-4be02792bbb13cc68baafb410ab63b236889bb26.tar.gz
Remove usage of removeprefix
It isn't available until python 3.9, and mac is currently on 3.8. Test: no test change needed Bug: None Change-Id: I473c850baedd6736b7b2e896280cf6d13c2088c9
-rw-r--r--rh/hooks.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/rh/hooks.py b/rh/hooks.py
index f826f0f..7edda83 100644
--- a/rh/hooks.py
+++ b/rh/hooks.py
@@ -407,7 +407,7 @@ def check_ktfmt(project, commit, _desc, diff, options=None):
include_dir_args = [x for x in options.args()
if x.startswith('--include-dirs=')]
- include_dirs = [x.removeprefix('--include-dirs=').split(',')
+ include_dirs = [x[len('--include-dirs='):].split(',')
for x in include_dir_args]
patterns = [fr'^{x}/.*\.kt$' for dir_list in include_dirs
for x in dir_list]