mirror of
https://github.com/meshcore-dev/meshcore_py.git
synced 2026-04-20 22:13:49 +00:00
remove some dead code
This commit is contained in:
parent
cbfc940de6
commit
478bcd92c1
5 changed files with 1 additions and 38 deletions
|
|
@ -1,30 +1,10 @@
|
|||
import functools
|
||||
import asyncio
|
||||
import logging
|
||||
import warnings
|
||||
import time
|
||||
from typing import Any, Callable, Awaitable, Optional, Union
|
||||
from typing import Any
|
||||
from .events import EventType
|
||||
|
||||
logger = logging.getLogger("meshcore")
|
||||
|
||||
class CommandError(Exception):
|
||||
def __init__(self, details=None):
|
||||
self.details = details
|
||||
super().__init__(f"Command error: {details}")
|
||||
|
||||
def deprecated(func):
|
||||
@functools.wraps(func)
|
||||
async def wrapper(*args, **kwargs):
|
||||
warnings.warn(
|
||||
f"Method {func.__name__} is deprecated. Use commands.{func.__name__} instead.",
|
||||
DeprecationWarning,
|
||||
stacklevel=2
|
||||
)
|
||||
return await func(*args, **kwargs)
|
||||
return wrapper
|
||||
|
||||
|
||||
class CommandHandler:
|
||||
DEFAULT_TIMEOUT = 5.0
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue