Skip to content

Commit 7ccd579

Browse files
author
James Souter
committed
pyright
1 parent 0c113ce commit 7ccd579

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/fastcs/util.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ def validate_hinted_attributes(controller: BaseController):
6767
f"attribute '{name}' does not match defined access mode. "
6868
f"Expected '{attr_class.__name__}', got '{type(attr).__name__}'."
6969
)
70-
if attr_dtype not in [attr.datatype.dtype, None]:
70+
if attr_dtype is not None and attr_dtype != attr.datatype.dtype:
7171
raise RuntimeError(
7272
f"Controller '{controller.__class__.__name__}' introspection of hinted "
7373
f"attribute '{name}' does not match defined datatype. "

0 commit comments

Comments
 (0)