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
|
|
@ -2,7 +2,6 @@
|
|||
mccli.py : CLI interface to MeschCore BLE companion app
|
||||
"""
|
||||
import asyncio
|
||||
import sys
|
||||
import logging
|
||||
|
||||
# Get logger
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,4 @@
|
|||
import asyncio
|
||||
import functools
|
||||
import warnings
|
||||
import logging
|
||||
from typing import Optional, Dict, Any
|
||||
|
||||
|
|
@ -12,18 +10,6 @@ from .commands import CommandHandler
|
|||
# Setup default logger
|
||||
logger = logging.getLogger("meshcore")
|
||||
|
||||
|
||||
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 MeshCore:
|
||||
"""
|
||||
Interface to a MeshCore device
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@
|
|||
mccli.py : CLI interface to MeschCore BLE companion app
|
||||
"""
|
||||
import asyncio
|
||||
import sys
|
||||
import logging
|
||||
import serial_asyncio
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@
|
|||
mccli.py : CLI interface to MeschCore BLE companion app
|
||||
"""
|
||||
import asyncio
|
||||
import sys
|
||||
import logging
|
||||
|
||||
# Get logger
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue