Skip to content

Commit 0ca5f2a

Browse files
committed
Parameter Fitter: Renovate definition of FitterParameter
1 parent 5da55e5 commit 0ca5f2a

File tree

1 file changed

+8
-11
lines changed

1 file changed

+8
-11
lines changed

Orange/base.py

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
from collections.abc import Iterable
44
import re
55
import warnings
6-
from types import NoneType
76
from typing import Callable, Optional, NamedTuple, Union, Type
87

98
import numpy as np
@@ -88,16 +87,14 @@ class Learner(ReprableWithPreprocessors):
8887
#: A sequence of data preprocessors to apply on data prior to
8988
#: fitting the model
9089
preprocessors = ()
91-
FittedParameter = NamedTuple(
92-
"FittedParameter", [
93-
("name", str),
94-
("label", str),
95-
("tick_label", str),
96-
("type", Type),
97-
("min", Union[int, NoneType]),
98-
("max", Union[int, NoneType]),
99-
]
100-
)
90+
91+
class FittedParameter(NamedTuple):
92+
name: str
93+
label: str
94+
tick_label: str
95+
type: Type
96+
min: Optional[int] = None
97+
max: Optional[int] = None
10198

10299
# Note: Do not use this class attribute.
103100
# It remains here for compatibility reasons.

0 commit comments

Comments
 (0)