@@ -242,11 +242,13 @@ def test_valid_ink_trajectory(
242242
243243def test_uniform_motion () -> None :
244244 """Test with points moving at constant velocity."""
245- points = pd .DataFrame ({
246- "x" : [0 , 1 , 2 , 3 ],
247- "y" : [0 , 0 , 0 , 0 ],
248- "seconds" : [0 , 1 , 2 , 3 ],
249- })
245+ points = pd .DataFrame (
246+ {
247+ "x" : [0 , 1 , 2 , 3 ],
248+ "y" : [0 , 0 , 0 , 0 ],
249+ "seconds" : [0 , 1 , 2 , 3 ],
250+ }
251+ )
250252 segment = models .LineSegment (
251253 start_label = "1" ,
252254 end_label = "2" ,
@@ -269,11 +271,13 @@ def test_uniform_motion() -> None:
269271
270272def test_accelerating_motion () -> None :
271273 """Test with motion accelerating over time."""
272- points = pd .DataFrame ({
273- "x" : [0 , 1 , 4 , 9 ],
274- "y" : [0 , 0 , 0 , 0 ],
275- "seconds" : [0 , 1 , 2 , 3 ],
276- })
274+ points = pd .DataFrame (
275+ {
276+ "x" : [0 , 1 , 4 , 9 ],
277+ "y" : [0 , 0 , 0 , 0 ],
278+ "seconds" : [0 , 1 , 2 , 3 ],
279+ }
280+ )
277281 segment = models .LineSegment (
278282 start_label = "1" ,
279283 end_label = "2" ,
@@ -299,11 +303,13 @@ def test_accelerating_motion() -> None:
299303
300304def test_velocity_two_points_only () -> None :
301305 """Test velocity calculation with only two points."""
302- points = pd .DataFrame ({
303- "x" : [0 , 3 ],
304- "y" : [0 , 4 ],
305- "seconds" : [0 , 2 ],
306- })
306+ points = pd .DataFrame (
307+ {
308+ "x" : [0 , 3 ],
309+ "y" : [0 , 4 ],
310+ "seconds" : [0 , 2 ],
311+ }
312+ )
307313 segment = models .LineSegment (
308314 start_label = "1" ,
309315 end_label = "2" ,
@@ -325,11 +331,13 @@ def test_velocity_two_points_only() -> None:
325331
326332def test_decelerating_motion () -> None :
327333 """Test with decelerating motion (negative acceleration)."""
328- points = pd .DataFrame ({
329- "x" : [0 , 4 , 7 , 9 ],
330- "y" : [0 , 0 , 0 , 0 ],
331- "seconds" : [0 , 1 , 2 , 3 ],
332- })
334+ points = pd .DataFrame (
335+ {
336+ "x" : [0 , 4 , 7 , 9 ],
337+ "y" : [0 , 0 , 0 , 0 ],
338+ "seconds" : [0 , 1 , 2 , 3 ],
339+ }
340+ )
333341 segment = models .LineSegment (
334342 start_label = "1" ,
335343 end_label = "2" ,
@@ -355,11 +363,13 @@ def test_decelerating_motion() -> None:
355363
356364def test_stationary_motion () -> None :
357365 """Test with no movement (all points the same)."""
358- points = pd .DataFrame ({
359- "x" : [1 , 1 , 1 ],
360- "y" : [1 , 1 , 1 ],
361- "seconds" : [0 , 1 , 2 ],
362- })
366+ points = pd .DataFrame (
367+ {
368+ "x" : [1 , 1 , 1 ],
369+ "y" : [1 , 1 , 1 ],
370+ "seconds" : [0 , 1 , 2 ],
371+ }
372+ )
363373 segment = models .LineSegment (
364374 start_label = "1" ,
365375 end_label = "2" ,
@@ -382,11 +392,13 @@ def test_stationary_motion() -> None:
382392
383393def test_no_hesitations_uniform_motion () -> None :
384394 """Test with uniform motion where all velocities are equal."""
385- points = pd .DataFrame ({
386- "x" : [0 , 1 , 2 , 3 ],
387- "y" : [0 , 0 , 0 , 0 ],
388- "seconds" : [0 , 1 , 2 , 3 ],
389- })
395+ points = pd .DataFrame (
396+ {
397+ "x" : [0 , 1 , 2 , 3 ],
398+ "y" : [0 , 0 , 0 , 0 ],
399+ "seconds" : [0 , 1 , 2 , 3 ],
400+ }
401+ )
390402 segment = models .LineSegment (
391403 start_label = "1" ,
392404 end_label = "2" ,
@@ -405,11 +417,13 @@ def test_no_hesitations_uniform_motion() -> None:
405417
406418def test_hesitation_at_start () -> None :
407419 """Test when the line starts with a hesitation."""
408- points = pd .DataFrame ({
409- "x" : [0 , 0.1 , 1 , 2 ],
410- "y" : [0 , 0.1 , 0 , 0 ],
411- "seconds" : [0 , 1 , 2 , 3 ],
412- })
420+ points = pd .DataFrame (
421+ {
422+ "x" : [0 , 0.1 , 1 , 2 ],
423+ "y" : [0 , 0.1 , 0 , 0 ],
424+ "seconds" : [0 , 1 , 2 , 3 ],
425+ }
426+ )
413427 segment = models .LineSegment (
414428 start_label = "1" ,
415429 end_label = "2" ,
@@ -428,11 +442,13 @@ def test_hesitation_at_start() -> None:
428442
429443def test_multiple_hesitations () -> None :
430444 """Test when there are multiple hesitation periods."""
431- points = pd .DataFrame ({
432- "x" : [0 , 100 , 100.1 , 200 , 200.1 , 300 , 400 , 500 , 600 ],
433- "y" : [0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 ],
434- "seconds" : [0 , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 ],
435- })
445+ points = pd .DataFrame (
446+ {
447+ "x" : [0 , 100 , 100.1 , 200 , 200.1 , 300 , 400 , 500 , 600 ],
448+ "y" : [0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 ],
449+ "seconds" : [0 , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 ],
450+ }
451+ )
436452 segment = models .LineSegment (
437453 start_label = "1" ,
438454 end_label = "2" ,
@@ -451,11 +467,13 @@ def test_multiple_hesitations() -> None:
451467
452468def test_less_than_three_velocities () -> None :
453469 """Test early return when velocities length is less than 3."""
454- points = pd .DataFrame ({
455- "x" : [0 , 1 ],
456- "y" : [0 , 0 ],
457- "seconds" : [0 , 1 ],
458- })
470+ points = pd .DataFrame (
471+ {
472+ "x" : [0 , 1 ],
473+ "y" : [0 , 0 ],
474+ "seconds" : [0 , 1 ],
475+ }
476+ )
459477 segment = models .LineSegment (
460478 start_label = "1" ,
461479 end_label = "2" ,
0 commit comments