Skip to content

Commit

Permalink
chore
Browse files Browse the repository at this point in the history
  • Loading branch information
jannisborn committed Jun 10, 2024
1 parent 9117c1c commit 340284d
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions src/gt4sd/algorithms/registry.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,17 @@
from dataclasses import dataclass as vanilla_dataclass
from dataclasses import field, make_dataclass
from functools import WRAPPER_ASSIGNMENTS, update_wrapper
from typing import Any, Callable, ClassVar, Dict, List, NamedTuple, Optional, Type, TypeVar
from typing import (
Any,
Callable,
ClassVar,
Dict,
List,
NamedTuple,
Optional,
Type,
TypeVar,
)

import pydantic

Expand Down Expand Up @@ -186,7 +196,7 @@ def decorator(
], # type: ignore
)
# NOTE: Needed to circumvent a pydantic TypeError: Parameter list to Generic[...] cannot be empty
VanillaConfiguration.__parameters__ = (TypeVar('T'),)
VanillaConfiguration.__parameters__ = (TypeVar("T"),)
# NOTE: Duplicate call necessary for pydantic >=1.10.* - see https://github.com/pydantic/pydantic/issues/4695
PydanticConfiguration: Type[AlgorithmConfiguration] = dataclass( # type: ignore
VanillaConfiguration
Expand Down

0 comments on commit 340284d

Please sign in to comment.