[7823dd]: / pathaia / patches / compat.py

Download this file

15 lines (12 with data), 397 Bytes

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
import warnings
from ..util.types import Coord
def convert_coords(coords):
if isinstance(coords, dict):
coords = Coord(**coords)
warnings.warn(
"Using dictionaries to represent coordinates is deprecated, its support will be dropped in future versions",
category=DeprecationWarning,
)
else:
coords = Coord(coords)
return coords