Skip to content
Snippets Groups Projects
Commit 851401be authored by juga's avatar juga
Browse files

circuitbuilder: circuit path is not a number in the code

There is no any case in our code where path is an integer.
Remove asserts, check only the lenght of the circuit and check it
in a more logical way.
parent 4642c109
Branches
Tags
No related merge requests found
......@@ -17,10 +17,7 @@ class PathLengthException(Exception):
def valid_circuit_length(path):
assert isinstance(path, int) or isinstance(path, list)
if isinstance(path, int):
return path > 0 and path <= 8
return len(path) > 0 and len(path) <= 8
return 0 < len(path) <= 8
class CircuitBuilder:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment