forked from M-Labs/artiq
transforms: PEP8
This commit is contained in:
parent
65567e1201
commit
35d4f75b65
|
@ -1,4 +1,5 @@
|
|||
"""This transform implements time management functions (delay/now/at)
|
||||
"""
|
||||
This transform implements time management functions (delay/now/at)
|
||||
using an accumulator 'now' and simple replacement rules:
|
||||
|
||||
delay(t) -> now += t
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
"""This transform turns calls to delay/now/at that use non-integer time
|
||||
"""
|
||||
This transform turns calls to delay/now/at that use non-integer time
|
||||
expressed in seconds into calls that use int64 time expressed in multiples of
|
||||
ref_period.
|
||||
|
||||
|
|
|
@ -4,6 +4,7 @@ from collections import defaultdict
|
|||
|
||||
from artiq.transforms.tools import is_ref_transparent, count_all_nodes
|
||||
|
||||
|
||||
class _TargetLister(ast.NodeVisitor):
|
||||
def __init__(self):
|
||||
self.targets = set()
|
||||
|
|
|
@ -104,7 +104,8 @@ def _is_ref_transparent(dependencies, expr):
|
|||
return all(_is_ref_transparent(dependencies, v) for v in expr.values)
|
||||
elif isinstance(expr, ast.Call):
|
||||
return (expr.func.id in _replaceable_funcs and
|
||||
all(_is_ref_transparent(dependencies, arg) for arg in expr.args))
|
||||
all(_is_ref_transparent(dependencies, arg)
|
||||
for arg in expr.args))
|
||||
else:
|
||||
return False
|
||||
|
||||
|
|
|
@ -385,7 +385,8 @@ class _Unparser:
|
|||
self.dispatch(k)
|
||||
self.write(": ")
|
||||
self.dispatch(v)
|
||||
_interleave(lambda: self.write(", "), write_pair, zip(t.keys, t.values))
|
||||
_interleave(lambda: self.write(", "), write_pair,
|
||||
zip(t.keys, t.values))
|
||||
self.write("}")
|
||||
|
||||
def _Tuple(self, t):
|
||||
|
|
Loading…
Reference in New Issue