Skip to content

Commit 651156e

Browse files
authored
Change Iterable to List for symbols in exceptions
1 parent 0b1f957 commit 651156e

1 file changed

Lines changed: 5 additions & 6 deletions

File tree

src/semantic_digital_twin/exceptions.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
from __future__ import annotations
22

33
from dataclasses import dataclass
4-
from typing import Iterable, Tuple, Union
54

6-
from typing_extensions import Optional, List, Type, TYPE_CHECKING, Callable
5+
from typing_extensions import Optional, List, Type, TYPE_CHECKING, Callable, Tuple, Union
76

87
from .datastructures.prefixed_name import PrefixedName
98

@@ -131,10 +130,10 @@ class HasFreeSymbolsError(SpatialTypesError):
131130
Raised when an operation can't be performed on an expression with free symbols.
132131
"""
133132

134-
symbols: Iterable[Symbol]
133+
symbols: List[Symbol]
135134

136135
def __post_init__(self):
137-
msg = f"Operation can't be performed on expression with free symbols: {list(self.symbols)}."
136+
msg = f"Operation can't be performed on expression with free symbols: {self.symbols}."
138137
super().__init__(msg)
139138

140139

@@ -144,10 +143,10 @@ class DuplicateSymbolsError(SpatialTypesError):
144143
Raised when duplicate symbols are found in an operation that requires unique symbols.
145144
"""
146145

147-
symbols: Iterable[Symbol]
146+
symbols: List[Symbol]
148147

149148
def __post_init__(self):
150-
msg = f"Operation failed due to duplicate symbols: {list(self.symbols)}. All symbols must be unique."
149+
msg = f"Operation failed due to duplicate symbols: {self.symbols}. All symbols must be unique."
151150
super().__init__(msg)
152151

153152

0 commit comments

Comments
 (0)