Skip to content

Commit

Permalink
lint: Apply pre-commit changes
Browse files Browse the repository at this point in the history
  • Loading branch information
nalquas committed Nov 25, 2024
1 parent 8d112fb commit da7a317
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,12 @@

import numpy as np
import raillabel
from raillabel.filter import IncludeObjectTypeFilter, IncludeSensorIdFilter, IncludeAnnotationTypeFilter, IncludeSensorTypeFilter, IncludeAttributesFilter

from raillabel_providerkit._util._filters import filter_sensor_uids_by_type
from raillabel.filter import (
IncludeAnnotationTypeFilter,
IncludeObjectTypeFilter,
IncludeSensorIdFilter,
IncludeSensorTypeFilter,
)


def validate_rail_side(scene: raillabel.Scene) -> list[str]:
Expand All @@ -33,11 +36,13 @@ def validate_rail_side(scene: raillabel.Scene) -> list[str]:
# Check per camera
for camera in cameras:
# Filter scene for track annotations in the selected camera sensor
filtered_scene = scene.filter([
IncludeObjectTypeFilter(["track"]),
IncludeSensorIdFilter([camera]),
IncludeAnnotationTypeFilter(["poly2d"]),
])
filtered_scene = scene.filter(
[
IncludeObjectTypeFilter(["track"]),
IncludeSensorIdFilter([camera]),
IncludeAnnotationTypeFilter(["poly2d"]),
]
)

# Check per frame
for frame_uid, frame in filtered_scene.frames.items():
Expand Down
2 changes: 1 addition & 1 deletion tests/test_raillabel_providerkit/validation/conftest.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# Copyright DB InfraGO AG and contributors
# SPDX-License-Identifier: Apache-2.0
# SPDX-License-Identifier: Apache-2.0
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def test_count_rails_per_track_in_frame__empty(empty_frame):
# def test_count_rails_per_track_in_frame__many_rails_for_one_track(
# empty_frame, example_camera_1, example_track_1
# ):


# frame = empty_frame
# sensor = example_camera_1
Expand Down

0 comments on commit da7a317

Please sign in to comment.