Author: Brian Kearns <bdkea...@gmail.com> Branch: Changeset: r70284:7950a956ce52 Date: 2014-03-25 12:24 -0400 http://bitbucket.org/pypy/pypy/changeset/7950a956ce52/
Log: cleanups diff --git a/pypy/module/_codecs/test/test_codecs.py b/pypy/module/_codecs/test/test_codecs.py --- a/pypy/module/_codecs/test/test_codecs.py +++ b/pypy/module/_codecs/test/test_codecs.py @@ -700,17 +700,17 @@ 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): diff --git a/rpython/jit/backend/llgraph/runner.py b/rpython/jit/backend/llgraph/runner.py --- a/rpython/jit/backend/llgraph/runner.py +++ b/rpython/jit/backend/llgraph/runner.py @@ -13,6 +13,7 @@ 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 @@ -66,7 +67,6 @@ 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 diff --git a/rpython/rlib/test/test_rposix.py b/rpython/rlib/test/test_rposix.py --- a/rpython/rlib/test/test_rposix.py +++ b/rpython/rlib/test/test_rposix.py @@ -59,9 +59,9 @@ 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): diff --git a/rpython/rtyper/lltypesystem/ll2ctypes.py b/rpython/rtyper/lltypesystem/ll2ctypes.py --- a/rpython/rtyper/lltypesystem/ll2ctypes.py +++ b/rpython/rtyper/lltypesystem/ll2ctypes.py @@ -358,7 +358,6 @@ 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 _______________________________________________ pypy-commit mailing list pypy-commit@python.org https://mail.python.org/mailman/listinfo/pypy-commit