Skip to content

Commit

Permalink
formatting (#460)
Browse files Browse the repository at this point in the history
add newline at end of files which had failed Lint test
  • Loading branch information
roomrys committed Mar 18, 2022
1 parent e6dbdfd commit 1daff21
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 7 deletions.
5 changes: 2 additions & 3 deletions tests/io/test_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -1434,8 +1434,7 @@ def test_remove_untracked_instances(min_tracks_2node_labels):
labels = min_tracks_2node_labels

# XXX(LM): should I remove multiple tracks and frames?
# XXX(LM): if len(labels.labeled_frames)==1,
# XXX(LM) then will not properly test lf.remove_untracked()
# XXX(LM): if len(labels.labeled_frames)==1, then will not properly test lf.remove_untracked()
# Preprocessing
labels.labeled_frames[0].instances[0].track = None
labels.labeled_frames[-1].instances = []
Expand All @@ -1457,4 +1456,4 @@ def test_remove_untracked_instances(min_tracks_2node_labels):

# Test function with remove_empty_frames=True
labels.remove_untracked_instances(remove_empty_frames=True)
assert all([(len(lf.instances) > 0) for lf in labels.labeled_frames])
assert all([(len(lf.instances) > 0) for lf in labels.labeled_frames])
2 changes: 1 addition & 1 deletion tests/nn/data/test_identity.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,4 +99,4 @@ def test_class_map_generator(min_tracks_2node_labels):
)
np.testing.assert_allclose(
tf.gather_nd(ex["class_maps"], subs), [[0, 1], [1, 0]], atol=1e-2
)
)
2 changes: 1 addition & 1 deletion tests/nn/test_inference_identity.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,4 +72,4 @@ def test_classify_peaks_from_maps():
assert_array_equal(points[0][0], peak_points.numpy()[[1, 2]])
assert_array_equal(points[0][1], [peak_points.numpy()[0], [np.nan, np.nan]])
assert_array_equal(points[1][0], [peak_points.numpy()[4], [np.nan, np.nan]])
assert_array_equal(points[1][1], [peak_points.numpy()[6], [np.nan, np.nan]])
assert_array_equal(points[1][1], [peak_points.numpy()[6], [np.nan, np.nan]])
6 changes: 4 additions & 2 deletions tests/test_instance.py
Original file line number Diff line number Diff line change
Expand Up @@ -485,8 +485,10 @@ def test_labeledframe_remove_untracked(
"""Test removal of untracked instances on both user-labeled and predicted frames.
Args:
min_tracks_2node_labels: Labels object which contains user labeled frames with tracked instances.
centered_pair_predictions: Labels object which contains predicted frames with tracked instances.
min_tracks_2node_labels: Labels object which contains user labeled frames with
tracked instances.
centered_pair_predictions: Labels object which contains predicted frames with
tracked instances.
"""
# Load user-labeled frames.
lf = min_tracks_2node_labels.labeled_frames[0]
Expand Down

0 comments on commit 1daff21

Please sign in to comment.