Commits

Brian Kearns committed 7950a95

cleanups

Comments (0)

Files changed (4)

pypy/module/_codecs/test/test_codecs.py

             return
         toencode = u'caf\xe9', 'caf\xe9'
         try:
-            #test for non-latin1 codepage, more general test needed
+            # test for non-latin1 codepage, more general test needed
             import _winreg
-            key = _winreg.OpenKey(_winreg.HKEY_LOCAL_MACHINE, 
+            key = _winreg.OpenKey(_winreg.HKEY_LOCAL_MACHINE,
                         r'System\CurrentControlSet\Control\Nls\CodePage')
-            if _winreg.QueryValueEx(key, 'ACP')[0] == u'1255': #non-latin1
+            if _winreg.QueryValueEx(key, 'ACP')[0] == u'1255':  # non-latin1
                 toencode = u'caf\xbf','caf\xbf'
         except:
             assert False, 'cannot test mbcs on this windows system, check code page'
         assert u'test'.encode('mbcs') == 'test'
         assert toencode[0].encode('mbcs') == toencode[1]
-        assert u'\u040a'.encode('mbcs') == '?' # some cyrillic letter
+        assert u'\u040a'.encode('mbcs') == '?'  # some cyrillic letter
         assert 'cafx\e9'.decode('mbcs') == u'cafx\e9'
 
     def test_bad_handler_string_result(self):

rpython/jit/backend/llgraph/runner.py

 from rpython.rtyper.llinterp import LLInterpreter, LLException
 from rpython.rtyper.lltypesystem import lltype, llmemory, rffi, rclass, rstr
 
+from rpython.rlib.clibffi import FFI_DEFAULT_ABI
 from rpython.rlib.rarithmetic import ovfcheck, r_uint, r_ulonglong
 from rpython.rlib.rtimer import read_timestamp
 
         self.args = args
 
 class CallDescr(AbstractDescr):
-    from rpython.rlib.clibffi import FFI_DEFAULT_ABI
     def __init__(self, RESULT, ARGS, extrainfo, ABI=FFI_DEFAULT_ABI):
         self.RESULT = RESULT
         self.ARGS = ARGS

rpython/rlib/test/test_rposix.py

         def f():
             return rposix.stat(self.path).st_mtime
         if sys.platform == 'win32':
-            #double vs. float, be satisfied with sub-millisec resolution
+            # double vs. float, be satisfied with sub-millisec resolution
             assert abs(interpret(f, []) - os.stat(self.ufilename).st_mtime) < 1e-4
-        else:    
+        else:
             assert interpret(f, []) == os.stat(self.ufilename).st_mtime
 
     def test_access(self):

rpython/rtyper/lltypesystem/ll2ctypes.py

 
     if isinstance(T, lltype.Ptr):
         if isinstance(T.TO, lltype.FuncType):
-            
             functype = ctypes.CFUNCTYPE
             if sys.platform == 'win32':
                 from rpython.rlib.clibffi import FFI_STDCALL, FFI_DEFAULT_ABI