@@ -134,15 +134,18 @@ def test_it_accepts_environment_variables(self):
134134
135135    def  test_persistent_cat_file_command (self ):
136136        # read header only 
137-         import  subprocess  as  sp 
138137        hexsha  =  "b2339455342180c7cc1e9bba3e9f181f7baa5167" 
139-         g  =  self .git .cat_file (batch_check = True , istream = sp .PIPE , as_process = True )
138+         g  =  self .git .cat_file (
139+             batch_check = True , istream = subprocess .PIPE , as_process = True 
140+         )
140141        g .stdin .write (b"b2339455342180c7cc1e9bba3e9f181f7baa5167\n " )
141142        g .stdin .flush ()
142143        obj_info  =  g .stdout .readline ()
143144
144145        # read header + data 
145-         g  =  self .git .cat_file (batch = True , istream = sp .PIPE , as_process = True )
146+         g  =  self .git .cat_file (
147+             batch = True , istream = subprocess .PIPE , as_process = True 
148+         )
146149        g .stdin .write (b"b2339455342180c7cc1e9bba3e9f181f7baa5167\n " )
147150        g .stdin .flush ()
148151        obj_info_two  =  g .stdout .readline ()
@@ -160,7 +163,7 @@ def test_persistent_cat_file_command(self):
160163
161164        # same can be achieved using the respective command functions 
162165        hexsha , typename , size  =  self .git .get_object_header (hexsha )
163-         hexsha , typename_two , size_two , data  =  self .git .get_object_data (hexsha )   # @UnusedVariable 
166+         hexsha , typename_two , size_two , _  =  self .git .get_object_data (hexsha )
164167        self .assertEqual (typename , typename_two )
165168        self .assertEqual (size , size_two )
166169
@@ -264,7 +267,7 @@ def test_environment(self, rw_dir):
264267                remote .fetch ()
265268            except  GitCommandError  as  err :
266269                if  sys .version_info [0 ] <  3  and  is_darwin :
267-                     self .assertIn ('ssh-orig, '    in  str (err ))
270+                     self .assertIn ('ssh-orig'  ,  str (err ))
268271                    self .assertEqual (err .status , 128 )
269272                else :
270273                    self .assertIn ('FOO' , str (err ))
0 commit comments