Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions pymodbus/simulator/simdata.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
"""Simulator data model classes."""
from __future__ import annotations

import asyncio
from collections.abc import Awaitable, Callable
from dataclasses import dataclass
from enum import Enum
Expand Down Expand Up @@ -194,7 +193,7 @@ def __post_init__(self):
raise TypeError("0 <= address < 65535")
if not isinstance(self.count, int) or not 0 < self.count <= 65535:
raise TypeError("0 < count <= 65535")
if self.action and not (callable(self.action) or asyncio.iscoroutinefunction(self.action)):
if self.action and not callable(self.action):
raise TypeError("action not Callable or Awaitable (async)")
if not isinstance(self.datatype, SimDataType):
raise TypeError("datatype not SimDataType")
Expand Down