Skip to content

Commit

Permalink
Merge pull request #239 from Stegallo/black-format
Browse files Browse the repository at this point in the history
Black Formatting
  • Loading branch information
Stegallo authored Dec 15, 2023
2 parents 452e5fa + 9830455 commit 353517b
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 353517b

Please sign in to comment.