Skip to content

Commit

Permalink
suppress sonar for random in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Eldies committed Jul 26, 2024
1 parent 58c2261 commit 52c5b66
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/unit/data_formats/test_yolo_format.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@


def randint(a, b):
return random.randint(a, b) # nosec B311
return random.randint(a, b) # nosec B311 # NOSONAR


class CompareDatasetMixin:
Expand Down Expand Up @@ -557,7 +557,7 @@ class Yolo8PoseConverterTest(Yolo8ConverterTest):
IMPORTER = Yolo8PoseImporter

def _generate_random_skeleton_annotation(self, skeleton_label_to_point_labels, n_of_labels=10):
label_id = random.choice(list(skeleton_label_to_point_labels.keys())) # nosec B311
label_id = random.choice(list(skeleton_label_to_point_labels.keys())) # nosec B311 # NOSONAR
return Skeleton(
[
Points(
Expand Down

0 comments on commit 52c5b66

Please sign in to comment.