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