oasm 0.1.4__py3-none-any.whl → 0.1.5__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
oasm/__init__.py
CHANGED
|
@@ -1395,31 +1395,19 @@ class WithPass(ast.NodeTransformer):
|
|
|
1395
1395
|
Else = self.env['Else']
|
|
1396
1396
|
if type(Else) is not str:
|
|
1397
1397
|
Else = 'Else'
|
|
1398
|
-
Elif = self.env['Elif']
|
|
1399
|
-
if type(Elif) is not str:
|
|
1400
|
-
Elif = 'Elif'
|
|
1401
1398
|
if isinstance(node.test, ast.Call) and node.test.func.id == '_':
|
|
1402
1399
|
node.test.func.id = If
|
|
1403
1400
|
elif RegQ(node.test, self.regq):
|
|
1404
1401
|
node.test = ast.Call(func=ast.Name(id=If, ctx=ast.Load(), lineno=node.lineno, col_offset = node.col_offset), args=[node.test], keywords=[], lineno=node.lineno, col_offset = node.col_offset)
|
|
1405
1402
|
if isinstance(node.test, ast.Call) and node.test.func.id == If:
|
|
1406
1403
|
withs = [ast.With(items=[ast.withitem(context_expr = node.test)], body=node.body, lineno=node.lineno, col_offset = node.col_offset)]
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
|
|
1414
|
-
else:
|
|
1415
|
-
orelse = ast.With(items=[\
|
|
1416
|
-
ast.withitem(context_expr = \
|
|
1417
|
-
ast.Call(func=ast.Name(id=Else, ctx=ast.Load(), lineno=node.lineno, col_offset = node.col_offset),\
|
|
1418
|
-
args=[], keywords=[], lineno=node.lineno, col_offset = node.col_offset),\
|
|
1419
|
-
lineno=node.lineno, col_offset = node.col_offset)], \
|
|
1420
|
-
body=node.orelse[i:], lineno=node.lineno, col_offset = node.col_offset)
|
|
1421
|
-
withs.append(orelse)
|
|
1422
|
-
break
|
|
1404
|
+
if len(node.orelse):
|
|
1405
|
+
withs.append(ast.With(items=[\
|
|
1406
|
+
ast.withitem(context_expr = \
|
|
1407
|
+
ast.Call(func=ast.Name(id=Else, ctx=ast.Load(), lineno=node.lineno, col_offset = node.col_offset),\
|
|
1408
|
+
args=[], keywords=[], lineno=node.lineno, col_offset = node.col_offset),\
|
|
1409
|
+
lineno=node.lineno, col_offset = node.col_offset)], \
|
|
1410
|
+
body=node.orelse, lineno=node.lineno, col_offset = node.col_offset))
|
|
1423
1411
|
return withs
|
|
1424
1412
|
return node
|
|
1425
1413
|
def visit_While(self, node):
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
oasm/__init__.py,sha256=7hI7IyEOnV3VoPq6ocWUXSiZ9PdoISLXp4NjGyHHYbk,66151
|
|
2
|
+
oasm-0.1.5.dist-info/METADATA,sha256=FJSdJI3ECMter4fbaNsYhL46NRnfT3uvtNGNL-9R5pQ,370
|
|
3
|
+
oasm-0.1.5.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
4
|
+
oasm-0.1.5.dist-info/top_level.txt,sha256=EacQcwgujQK1Vg--A4w6awZ2LPUTDx7kHNRd9BsavOc,5
|
|
5
|
+
oasm-0.1.5.dist-info/RECORD,,
|
oasm-0.1.4.dist-info/RECORD
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
oasm/__init__.py,sha256=7Ysrt9CdNWtMfyils2KYpiCQFXPMRlv2xCeCSBhnUgw,66722
|
|
2
|
-
oasm-0.1.4.dist-info/METADATA,sha256=tRmbpeCw5wkLjWpMpRYWd5FvdNY4iFehe_kj_9jxkCo,370
|
|
3
|
-
oasm-0.1.4.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
4
|
-
oasm-0.1.4.dist-info/top_level.txt,sha256=EacQcwgujQK1Vg--A4w6awZ2LPUTDx7kHNRd9BsavOc,5
|
|
5
|
-
oasm-0.1.4.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|