Skip to content
This repository was archived by the owner on Dec 31, 2021. It is now read-only.

Commit 628bec8

Browse files
committed
Fixing a bug with the pre-commit the import ordering.
1 parent 88fa2d9 commit 628bec8

21 files changed

+28
-7
lines changed

.pre-commit-config.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ repos:
2121
rev: v2.6.0
2222
hooks:
2323
- id: reorder-python-imports
24+
args: [--application-directories=.:src/]
2425
- repo: https://github.com/myint/docformatter
2526
rev: v1.4
2627
hooks:

src/day11/__init__.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
"""--- Day 11: Dumbo Octopus ---"""
22
from pathlib import Path
33

4-
from aoc import open_utf8
54
from numpy import all as all_
65
from numpy import array
76
from numpy import byte
87
from numpy import where
98

9+
from aoc import open_utf8
10+
1011

1112
def __execute_step(data: array, bounds: [[]]) -> int:
1213
"""Recursive function to simulate a single step in time for the input

src/day13/__init__.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,15 @@
22
from dataclasses import dataclass
33
from pathlib import Path
44

5-
from aoc import open_utf8
65
from numpy import array
76
from numpy import bitwise_or
87
from numpy import byte
98
from numpy import flip
109
from numpy import sum as sum_
1110
from numpy import zeros
1211

12+
from aoc import open_utf8
13+
1314

1415
@dataclass
1516
class Fold:

src/day15/__init__.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,13 @@
33
from heapq import heappush
44
from pathlib import Path
55

6-
from aoc import open_utf8
76
from numpy import add
87
from numpy import array
98
from numpy import byte
109
from numpy import zeros
1110

11+
from aoc import open_utf8
12+
1213

1314
class Node:
1415
"""A star path node."""

src/day4/__init__.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,13 @@
22
from dataclasses import dataclass
33
from pathlib import Path
44

5-
from aoc import log
6-
from aoc import open_utf8
75
from numpy import array
86
from numpy import byte
97
from numpy import sum as sum_
108

9+
from aoc import log
10+
from aoc import open_utf8
11+
1112

1213
@dataclass
1314
class Bingo:

src/day9/__init__.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,14 @@
22
from dataclasses import dataclass
33
from pathlib import Path
44

5-
from aoc import log
6-
from aoc import open_utf8
75
from numpy import array
86
from numpy import byte
97
from numpy import product
108
from numpy import sort
119

10+
from aoc import log
11+
from aoc import open_utf8
12+
1213

1314
@dataclass
1415
class Location:

src/tests/test_day1.py

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
from pathlib import Path
33

44
import pytest
5+
56
from aoc import log
67
from aoc import ROOT_PATH
78
from day1 import count_increases

src/tests/test_day10.py

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
from pathlib import Path
33

44
import pytest
5+
56
from aoc import ROOT_PATH
67
from day10 import parse_data
78

src/tests/test_day11.py

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
from pathlib import Path
33

44
import pytest
5+
56
from aoc import log
67
from aoc import ROOT_PATH
78
from day11 import execute_steps

src/tests/test_day12.py

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
from pathlib import Path
33

44
import pytest
5+
56
from aoc import log
67
from aoc import ROOT_PATH
78
from day12 import enumerate_paths

src/tests/test_day13.py

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
from pathlib import Path
33

44
import pytest
5+
56
from aoc import log
67
from aoc import ROOT_PATH
78
from day13 import do_origami

src/tests/test_day14.py

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
from pathlib import Path
33

44
import pytest
5+
56
from aoc import log
67
from aoc import ROOT_PATH
78
from day14 import load_dataset

src/tests/test_day15.py

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
from pathlib import Path
33

44
import pytest
5+
56
from aoc import log
67
from aoc import ROOT_PATH
78
from day15 import a_starify

src/tests/test_day2.py

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
from pathlib import Path
33

44
import pytest
5+
56
from aoc import log
67
from aoc import ROOT_PATH
78
from day2 import compute_xy_product

src/tests/test_day3.py

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
from pathlib import Path
33

44
import pytest
5+
56
from aoc import log
67
from aoc import ROOT_PATH
78
from day3 import DiagnosticRates

src/tests/test_day4.py

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
from pathlib import Path
33

44
import pytest
5+
56
from aoc import ROOT_PATH
67
from day4 import Bingo
78

src/tests/test_day5.py

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
from pathlib import Path
33

44
import pytest
5+
56
from aoc import log
67
from aoc import ROOT_PATH
78
from day5 import load_dataset

src/tests/test_day6.py

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
from pathlib import Path
33

44
import pytest
5+
56
from aoc import log
67
from aoc import ROOT_PATH
78
from day6 import load_dataset

src/tests/test_day7.py

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
from pathlib import Path
33

44
import pytest
5+
56
from aoc import log
67
from aoc import ROOT_PATH
78
from day7 import find_minima

src/tests/test_day8.py

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
from pathlib import Path
33

44
import pytest
5+
56
from aoc import log
67
from aoc import ROOT_PATH
78
from day8 import decode_sequences

src/tests/test_day9.py

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
from pathlib import Path
33

44
import pytest
5+
56
from aoc import log
67
from aoc import ROOT_PATH
78
from day9 import find_low_points

0 commit comments

Comments
 (0)