Skip to content
Permalink
Browse files

some lint cleanups

  • Loading branch information
Alex Gaynor
Alex Gaynor committed Apr 24, 2013
1 parent 7e63d9a commit 1c0a9e2a6723d414298c5512739ffd9ba727119a
@@ -287,6 +287,7 @@ def compile(self, ctx):
ctx.emit(consts.LOAD_SINGLETON_CLASS)
self.compile_body(ctx, "singletonclass")


class Module(BaseModule):
def compile(self, ctx):
if self.scope is not None:
@@ -337,9 +337,9 @@ def method_insert(self, space, i, args_w):
return self
if i < 0:
if i < -length - 1:
raise space.error(space.w_IndexError,
"index %d too small for array; minimum: %d" % (i + 1, -length)
)
raise space.error(space.w_IndexError,
"index %d too small for array; minimum: %d" % (i + 1, -length)
)
i += length + 1
assert i >= 0
for w_e in args_w:
@@ -1,5 +1,4 @@
import os
import sys
import stat

from topaz.coerce import Coerce
@@ -9,7 +8,6 @@
from topaz.objects.hashobject import W_HashObject
from topaz.objects.objectobject import W_Object
from topaz.objects.ioobject import W_IOObject
from topaz.objects.stringobject import W_StringObject
from topaz.system import IS_WINDOWS
from topaz.utils.ll_file import O_BINARY, ftruncate, isdir, fchmod
from topaz.utils.filemode import map_filemode
@@ -22,12 +22,12 @@ def method_initialize(self, space, w_start, w_end, excl=False):
if self.w_start is not None or self.w_end is not None:
raise space.error(space.w_NameError, "`initialize' called twice")
if space.send(w_start, space.newsymbol("<=>"), [w_end]) is space.w_nil:
raise space.error(space.w_ArgumentError, "bad value for range" )
raise space.error(space.w_ArgumentError, "bad value for range")

self.w_start = w_start
self.w_end = w_end
self.exclusive = excl

@classdef.method("begin")
def method_begin(self, space):
return self.w_start
@@ -1,5 +1,4 @@
import os
import sys

from topaz.objects.stringobject import W_StringObject
from topaz.utils.ll_file import O_BINARY
@@ -1,5 +1,3 @@
import sys

from rpython.rlib import rposix
from rpython.rtyper.lltypesystem import rffi, lltype
from rpython.rtyper.tool import rffi_platform as platform
@@ -1,6 +1,4 @@
import os
import stat
import sys

from rpython.rtyper.lltypesystem import rffi
from rpython.rtyper.tool import rffi_platform as platform
@@ -12,12 +10,13 @@
if IS_WINDOWS:
O_BINARY = os.O_BINARY

eci = ExternalCompilationInfo(includes=['windows.h'])
eci = ExternalCompilationInfo(includes=["windows.h"])

class CConfig:
_compilation_info_ = eci
config = platform.configure(CConfig)

_chsize = rffi.llexternal('_chsize',
_chsize = rffi.llexternal("_chsize",
[rffi.INT, rffi.LONG], rffi.INT,
compilation_info=eci,
)

0 comments on commit 1c0a9e2

Please sign in to comment.