Skip to content

Commit

Permalink
some lint cleanups
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex Gaynor committed Apr 24, 2013
1 parent 7e63d9a commit 1c0a9e2
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 14 deletions.
1 change: 1 addition & 0 deletions topaz/ast.py
Expand Up @@ -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:
Expand Down
6 changes: 3 additions & 3 deletions topaz/objects/arrayobject.py
Expand Up @@ -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:
Expand Down
2 changes: 0 additions & 2 deletions topaz/objects/fileobject.py
@@ -1,5 +1,4 @@
import os
import sys
import stat

from topaz.coerce import Coerce
Expand All @@ -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
Expand Down
4 changes: 2 additions & 2 deletions topaz/objects/rangeobject.py
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion topaz/utils/filemode.py
@@ -1,5 +1,4 @@
import os
import sys

from topaz.objects.stringobject import W_StringObject
from topaz.utils.ll_file import O_BINARY
Expand Down
2 changes: 0 additions & 2 deletions topaz/utils/ll_dir.py
@@ -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
Expand Down
7 changes: 3 additions & 4 deletions topaz/utils/ll_file.py
@@ -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
Expand All @@ -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,
)
Expand Down

0 comments on commit 1c0a9e2

Please sign in to comment.