Skip to content

Commit db2acb5

Browse files
black formatting
1 parent 85e80a1 commit db2acb5

1 file changed

Lines changed: 35 additions & 6 deletions

File tree

pymeos/main/tpoint.py

Lines changed: 35 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1308,18 +1308,47 @@ def y(self) -> TFloatSeq:
13081308

13091309
def z(self) -> TFloatSeq:
13101310
return super().z()
1311-
1311+
13121312
@staticmethod
1313-
def from_arrays(t: List[Union[datetime, str]], x: List[float], y: List[float], z: Optional[List[float]] = None,
1314-
srid: int = 0, geodetic: bool = False, lower_inc: bool = True, upper_inc: bool = False,
1315-
linear: bool = True, normalize: bool = True) -> TPointSeq:
1313+
def from_arrays(
1314+
t: List[Union[datetime, str]],
1315+
x: List[float],
1316+
y: List[float],
1317+
z: Optional[List[float]] = None,
1318+
srid: int = 0,
1319+
geodetic: bool = False,
1320+
lower_inc: bool = True,
1321+
upper_inc: bool = False,
1322+
linear: bool = True,
1323+
normalize: bool = True,
1324+
) -> TPointSeq:
13161325

13171326
from ..factory import _TemporalFactory
1327+
13181328
assert len(t) == len(x) == len(y)
1319-
times = [datetime_to_timestamptz(ti) if isinstance(ti, datetime) else pg_timestamptz_in(ti, -1) for ti in t]
1329+
times = [
1330+
(
1331+
datetime_to_timestamptz(ti)
1332+
if isinstance(ti, datetime)
1333+
else pg_timestamptz_in(ti, -1)
1334+
)
1335+
for ti in t
1336+
]
13201337

13211338
return _TemporalFactory.create_temporal(
1322-
tpointseq_make_coords(x, y, z, times, len(t), srid, geodetic, lower_inc, upper_inc, linear, normalize)
1339+
tpointseq_make_coords(
1340+
x,
1341+
y,
1342+
z,
1343+
times,
1344+
len(t),
1345+
srid,
1346+
geodetic,
1347+
lower_inc,
1348+
upper_inc,
1349+
linear,
1350+
normalize,
1351+
)
13231352
)
13241353

13251354
def plot(self, *args, **kwargs):

0 commit comments

Comments
 (0)