diff --git a/tests/common/test_utilites.py b/tests/common/test_utilites.py index 5c01f67..ea59441 100644 --- a/tests/common/test_utilites.py +++ b/tests/common/test_utilites.py @@ -1,4 +1,4 @@ -from common.utilities import bitand, bitor, lshift, rshift, bitnot +from common.utilities import bitand, bitnot, bitor, lshift, rshift def test_bit_ops(): diff --git a/tests/y_2015/test_2015_day7.py b/tests/y_2015/test_2015_day7.py index 704dfc0..3c977d3 100644 --- a/tests/y_2015/test_2015_day7.py +++ b/tests/y_2015/test_2015_day7.py @@ -30,14 +30,14 @@ def test_calculate_2(): def test_Element_resolve(): - element = Element('123') + element = Element("123") assert element.resolve({}) == 123 - element = Element('a') - assert element.resolve({'a': Element('1')}) == 1 + element = Element("a") + assert element.resolve({"a": Element("1")}) == 1 - element = Element('NOT 1') + element = Element("NOT 1") assert element.resolve({}) == 65534 - element = Element('a') - assert element.resolve({'a': Element('b AND b'), 'b': Element('1')}) == 1 + element = Element("a") + assert element.resolve({"a": Element("b AND b"), "b": Element("1")}) == 1 diff --git a/y_2015/day7.py b/y_2015/day7.py index b4dd0f7..98320b4 100644 --- a/y_2015/day7.py +++ b/y_2015/day7.py @@ -3,10 +3,7 @@ from pydantic.dataclasses import dataclass from common.aoc import AoCDay - - -from common.utilities import bitand, bitor, lshift, rshift, bitnot - +from common.utilities import bitand, bitnot, bitor, lshift, rshift OPERATORS: Dict[str, Any] = { "NOT": bitnot,