@@ -146,7 +146,7 @@ def get_sha():
146
146
GITHUB_SHA cannot be used because in a pull request it gives the sha of the
147
147
fake merge commit.
148
148
'''
149
- return _get_output (['git' ,'rev-parse' , f' { get_branch ()} ' ])
149
+ return _get_output (['git' ,'rev-parse' , get_branch ()])
150
150
151
151
152
152
def get_event ():
@@ -159,13 +159,12 @@ def get_event():
159
159
160
160
def get_branch_files ():
161
161
'''Get all files in branch'''
162
- branch = get_branch ()
163
- return _get_output (['git' ,'ls-tree' , '-r' , f'{ branch } ' ,'--name-only' ]).splitlines ()
162
+ return _get_output (['git' ,'ls-tree' , '-r' , get_branch (),'--name-only' ]).splitlines ()
164
163
165
164
166
165
def add_file_to_index (filename ):
167
166
'''Add file to current commit'''
168
- return _get_output (['git' ,'add' ,f' { filename } ' ])
167
+ return _get_output (['git' ,'add' ,filename ])
169
168
170
169
171
170
def get_commit_files ():
@@ -284,7 +283,7 @@ def _test(input, output):
284
283
def get_config_setting (setting ):
285
284
'''Get the value of a config setting'''
286
285
try :
287
- return _get_output (['git' , 'config' , '--get' , f' { setting } ' ]).strip ()
286
+ return _get_output (['git' , 'config' , '--get' , setting ]).strip ()
288
287
except subprocess .CalledProcessError :
289
288
return None
290
289
0 commit comments