Skip to content

Commit a0f6fbf

Browse files
committed
Fix E305: expected 2 blank lines after class or function definition
1 parent c47a174 commit a0f6fbf

21 files changed

Lines changed: 29 additions & 0 deletions

nativepython/llvm_compiler.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ def sizeof_native_type(native_type):
5959
.get_abi_size(target_machine.target_data)
6060
)
6161

62+
6263
#there can be only one llvm engine alive at once.
6364
_engineCache = []
6465

nativepython/native_ast.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ def type_str(c):
5555
def raising(e):
5656
raise e
5757

58+
5859
Type = Alternative("Type",
5960
Void={},
6061
Float={'bits': int},
@@ -105,6 +106,7 @@ def const_str(c):
105106

106107
assert False, type(c)
107108

109+
108110
Constant = Alternative("Constant",
109111
Void={},
110112
Float={'val': float, 'bits': int},
@@ -190,6 +192,7 @@ def filterCallTargetArgs(args):
190192
res.append(a.nonref_expr)
191193
return res
192194

195+
193196
CallTarget = Alternative("CallTarget",
194197
Named={'target': NamedCallTarget},
195198
Pointer={'expr': Expression},
@@ -204,6 +207,7 @@ def teardown_str(self):
204207
return "if slot_initialized(name=%s):\n" % self.tag + indent(str(self.expr), " ")
205208
assert False, type(self)
206209

210+
207211
Teardown = Alternative("Teardown",
208212
ByTag={'tag': str, 'expr': Expression},
209213
Always={'expr': Expression},
@@ -349,6 +353,7 @@ def expr_is_simple(expr):
349353
return expr_is_simple(expr.vals[0])
350354
return False
351355

356+
352357
Expression = Alternative("Expression",
353358
Constant={'val': Constant},
354359
Comment={'comment': str, 'expr': Expression},
@@ -442,6 +447,7 @@ def ensureExpr(x):
442447
return x
443448
return x.nonref_expr
444449

450+
445451
nullExpr = Expression.Constant(val=Constant.Void())
446452
emptyStructExpr = Expression.Constant(val=Constant.Struct(elements=[]))
447453
trueExpr = Expression.Constant(val=Constant.Int(bits=1, val=1, signed=False))
@@ -489,6 +495,7 @@ def const_bytes_cstr(i):
489495
val=Constant.ByteArray(val=i)
490496
)
491497

498+
492499
FunctionBody = Alternative("FunctionBody",
493500
Internal={'body': Expression},
494501
External={'name': str}

nativepython/native_ast_to_llvm.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ def type_to_llvm_type(t):
7575

7676
assert False, "Can't handle %s yet" % t
7777

78+
7879
strings_ever = [0]
7980

8081

nativepython/tests/arithmetic_compilation_test.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ def Compiled(f):
2323
f = Function(f)
2424
return Runtime.singleton().compile(f)
2525

26+
2627
In = OneOf(int, float)
2728
Out = OneOf(int, float, bool)
2829

nativepython/tests/class_compilation_test.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ def Compiled(f):
2323
f = Function(f)
2424
return Runtime.singleton().compile(f)
2525

26+
2627
AClass = lambda: AClass
2728

2829

nativepython/tests/const_dict_compilation_test.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ def Compiled(f):
2424
f = Function(f)
2525
return Runtime.singleton().compile(f)
2626

27+
2728
dictTypes = [
2829
ConstDict(str, str),
2930
ConstDict(int, str),

nativepython/type_wrappers/range_wrapper.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ def convert_next(self, context, expr):
9090

9191
return nextExpr, canContinue
9292

93+
9394
_RangeWrapper = RangeWrapper()
9495
_RangeInstanceWrapper = RangeInstanceWrapper()
9596
_RangeIteratorWrapper = RangeIteratorWrapper()

nativepython/type_wrappers/runtime_functions.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ def externalCallTarget(name, output, *inputs):
3333
)
3434
)
3535

36+
3637
free = externalCallTarget("free", Void, UInt8Ptr)
3738
malloc = externalCallTarget("malloc", UInt8Ptr, Int64)
3839
realloc = externalCallTarget("realloc", UInt8Ptr, UInt8Ptr, Int64)

object_database/database_connection.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
class Everything:
3838
"""Singleton to mark subscription to everything in a slice."""
3939

40+
4041
TransactionResult = Alternative(
4142
"TransactionResult",
4243
Success={},

object_database/database_test.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ def waitForCallback(self, timeout):
5454
def releaseCallback(self):
5555
self.is_released.put(True)
5656

57+
5758
expr = Alternative("Expr",
5859
Constant={'value': int},
5960
#Add = {'l': expr, 'r': expr},

0 commit comments

Comments
 (0)