Skip to content

Commit

Permalink
Merge pull request #139 from nikobockerman/use-new-syntax-for-default…
Browse files Browse the repository at this point in the history
…-generic-type

Use PEP-696 syntax for default generic type
  • Loading branch information
nikobockerman authored Dec 20, 2024
2 parents e00bd43 + 9ced4d3 commit 26e08f0
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions adventofcode/tooling/map.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from __future__ import annotations

import enum
from typing import TYPE_CHECKING, Generic, Literal, TypeVar, assert_never, overload
from typing import TYPE_CHECKING, Literal, assert_never, overload

from .coordinates import X, Y
from .directions import RotationDirection
Expand All @@ -25,10 +25,7 @@ class IterDirection(enum.Enum):
Columns = enum.auto()


Map2dDataType = TypeVar("Map2dDataType", default=str)


class Map2d(Generic[Map2dDataType]):
class Map2d[Map2dDataType = str]:
__slots__ = ("_br_x", "_br_y", "_height", "_sequence_data", "_width")

def __init__(
Expand Down

0 comments on commit 26e08f0

Please sign in to comment.