Skip to content

Commit

Permalink
format code with black
Browse files Browse the repository at this point in the history
  • Loading branch information
Stegallo authored Dec 15, 2023
1 parent 452e5fa commit 9830455
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
4 changes: 3 additions & 1 deletion y_2023/day6.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
from common.aoc import AoCDay
from typing import List, Optional

from pydantic.dataclasses import dataclass

from common.aoc import AoCDay


@dataclass
class Placeholder:
Expand Down
11 changes: 6 additions & 5 deletions y_2023/day7.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
from typing import List, Dict
from common.aoc import AoCDay
from pydantic.dataclasses import dataclass
from collections import Counter
from typing import Dict, List

from pydantic.dataclasses import dataclass

from common.aoc import AoCDay

RANK_TYPE = {
"Five of a kind": 1,
Expand Down Expand Up @@ -142,8 +144,7 @@ def __compute(self, type: str) -> int:
final_ordering.extend(sorted(list(i), key=lambda x: x.hand.sort_ord(type)))

return sum(
(len(final_ordering) - c) * int(i.bid)
for c, i in enumerate(final_ordering)
(len(final_ordering) - c) * int(i.bid) for c, i in enumerate(final_ordering)
)

def _calculate_1(self) -> int: # 246424613
Expand Down

0 comments on commit 9830455

Please sign in to comment.