fix: else-return on runtime (#4881)

* fix: add init file

* fix: no else-return

* fix: remove file again
This commit is contained in:
Roelof van Dijk 2024-06-08 14:44:24 +02:00 committed by GitHub
commit 1785a70e77
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 14 additions and 16 deletions

View file

@ -17,7 +17,7 @@ def _load(m, i):
def load(inp, j=0):
if len(inp) == 4: return [_load(m, x+j) if gate else default for m,x,gate,default in zip(*inp)]
else: return [_load(m, x+j) for m,x in zip(inp[0], inp[1])]
return [_load(m, x+j) for m,x in zip(inp[0], inp[1])]
def _store(m, i, v):
if i < 0 or i >= len(m): raise IndexError(f"store out of bounds, size is {len(m)}, access is {i}, value is {v}")