Skip to content

Commit 660e87b

Browse files
authored
Fix python3.14 deprecation. (#2759)
1 parent 2df9dda commit 660e87b

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

pymodbus/simulator/simdata.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
"""Simulator data model classes."""
22
from __future__ import annotations
33

4-
import asyncio
54
from collections.abc import Awaitable, Callable
65
from dataclasses import dataclass
76
from enum import Enum
@@ -194,7 +193,7 @@ def __post_init__(self):
194193
raise TypeError("0 <= address < 65535")
195194
if not isinstance(self.count, int) or not 0 < self.count <= 65535:
196195
raise TypeError("0 < count <= 65535")
197-
if self.action and not (callable(self.action) or asyncio.iscoroutinefunction(self.action)):
196+
if self.action and not callable(self.action):
198197
raise TypeError("action not Callable or Awaitable (async)")
199198
if not isinstance(self.datatype, SimDataType):
200199
raise TypeError("datatype not SimDataType")

0 commit comments

Comments
 (0)