@@ -171,7 +171,7 @@ def add_file_to_branch(repo, branch_name, file_name, do_push=True, folder='.'):
171171 else :
172172 repo .cmd (f'echo { branch_name } > { file_name } ' )
173173 repo .cmd (f'git add { folder } /{ file_name } ' )
174- repo .cmd (f 'git commit -m "adds %s file on %s"' % (file_name , branch_name ))
174+ repo .cmd ('git commit -m "adds %s file on %s"' % (file_name , branch_name ))
175175 if do_push :
176176 repo .cmd ('git pull || exit 0' )
177177 repo .cmd ('git push --set-upstream origin ' + branch_name )
@@ -885,7 +885,7 @@ def handle_legacy(self, token, backtrace):
885885 bert_e_main ()
886886 except exns .Queued as excp :
887887 queued_excp = excp
888- except exns .SilentException as excp :
888+ except exns .SilentException :
889889 if backtrace :
890890 raise
891891 else :
@@ -903,7 +903,7 @@ def handle_legacy(self, token, backtrace):
903903 pr = self .robot_bb .get_pull_request (pull_request_id = token )
904904 if pr .author == self .args .robot_username :
905905 # Get main PR
906- id = int (re .findall ('\d+' , pr .description )[0 ])
906+ id = int (re .findall (r '\d+' , pr .description )[0 ])
907907 pr = self .robot_bb .get_pull_request (pull_request_id = id )
908908 sha1 = pr .src_commit
909909
@@ -3790,7 +3790,7 @@ def test_branch_name_escape(self):
37903790 unescaped = 'bugfix/dangerous-branch-name-${TEST}'
37913791
37923792 # Bypass git-api to create the branch (explicit escape of the bad char)
3793- branch_name = unescaped .replace ('$' , '\$' )
3793+ branch_name = unescaped .replace (r '$' , r '\$' )
37943794 cmd ('git checkout development/5.1' , cwd = self .gitrepo .cmd_directory )
37953795 cmd ('git checkout -b %s' % branch_name , cwd = self .gitrepo .cmd_directory )
37963796
0 commit comments