File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -104,12 +104,13 @@ def __init__(
104
104
# Defer checks for empty sequences to check type hints.
105
105
# Report errors here when we can so the error points to the tunable line.
106
106
if default or not isinstance (default , collections .abc .Sequence ):
107
- self . _topic_type = _get_topic_type_for_value (default )
108
- if self . _topic_type is None :
107
+ topic_type = _get_topic_type_for_value (default )
108
+ if topic_type is None :
109
109
checked_type : type = type (default )
110
110
raise TypeError (
111
111
f"tunable is not publishable to NetworkTables, type: { checked_type .__name__ } "
112
112
)
113
+ self ._topic_type = topic_type
113
114
114
115
def __set_name__ (self , owner : type , name : str ) -> None :
115
116
type_hint : Optional [type ] = None
You can’t perform that action at this time.
0 commit comments