Code formatting

This commit is contained in:
akp 2020-12-21 13:45:43 +00:00
parent 93082b4cd9
commit 6e57047c6a
No known key found for this signature in database
GPG key ID: D3E7EAA31B39637E
2 changed files with 8 additions and 3 deletions

View file

@ -7,7 +7,10 @@ instr = open("../input.txt").read()
expressions = instr.strip().split("\n")
expressions = [
partOne.parse_expression(list(("( " + x.replace("*", ") * (") + " )").replace(" ", "")))[0] for x in instr.strip().split("\n")
partOne.parse_expression(
list(("( " + x.replace("*", ") * (") + " )").replace(" ", ""))
)[0]
for x in instr.strip().split("\n")
]
sigma = 0
@ -15,4 +18,4 @@ sigma = 0
for expression in expressions:
sigma += partOne.calculate(expression)
print(sigma)
print(sigma)

View file

@ -29,7 +29,9 @@ def parse(instr: str) -> List[Tile]:
return [Tile(x) for x in instr.strip().split("\n\n")]
def get_edge_information(tiles:List[Tile]) -> Tuple[Dict[str, Set[int]], Dict[int, int]]:
def get_edge_information(
tiles: List[Tile],
) -> Tuple[Dict[str, Set[int]], Dict[int, int]]:
edges = {}
shared_edge_count = {x.number: 0 for x in tiles}