Browse Source

Black formatting

pull/10/head
Ryan Reed 3 years ago
parent
commit
a33c9e57ca
1 changed files with 3 additions and 5 deletions
  1. +3
    -5
      puzzles/day10.py

+ 3
- 5
puzzles/day10.py View File

@ -12,11 +12,10 @@ from typing import Dict, List, Tuple
from statistics import median
class Subsystem:
nav_data = None
open_chars = ['(', '[', '{', '<']
close_chars = [')', ']', '}', '>']
open_chars = ["(", "[", "{", "<"]
close_chars = [")", "]", "}", ">"]
def __init__(self, inputs: List[str]) -> None:
self.nav_data = inputs
@ -42,7 +41,7 @@ class Subsystem:
corrupted_chars.append(char)
break
del opens[-1] # Clear the open bracket
del opens[-1] # Clear the open bracket
if corrupted:
chunks["corrupted"].append(line)
@ -73,7 +72,6 @@ class Subsystem:
return median(total_scores)
def part1(inputs: List[int]) -> int:
s = Subsystem(inputs)
return s.score_corrupted()


Loading…
Cancel
Save