From 271bda3ef7312b8c2a5bd0175ad6a42a3ec3e0e0 Mon Sep 17 00:00:00 2001 From: James McKinney <26463+jpmckinney@users.noreply.github.com> Date: Sun, 15 Sep 2024 01:06:49 -0400 Subject: [PATCH] chore: Document noqa usage --- dataset/unique/tender_id.py | 2 +- pelican/util/checks.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/dataset/unique/tender_id.py b/dataset/unique/tender_id.py index 0843a8c..8dd1922 100644 --- a/dataset/unique/tender_id.py +++ b/dataset/unique/tender_id.py @@ -35,7 +35,7 @@ def get_result(scope): for tender_id, items in scope.items(): # Pick the "main" item that others repeat, at random. - item = random.choice(items) # noqa: S311 + item = random.choice(items) # noqa: S311 # non-cryptographic sample = {"tender_id": tender_id, "ocid": item["ocid"], "item_id": item["item_id"], "all_items": items} repetitions = len(items) if repetitions == 1: diff --git a/pelican/util/checks.py b/pelican/util/checks.py index 7c51030..b510195 100644 --- a/pelican/util/checks.py +++ b/pelican/util/checks.py @@ -98,7 +98,7 @@ def complete_result_resource( def complete_result_resource_pass_fail( result: dict[str, Any], - passed: bool, # noqa: FBT001 + passed: bool, # noqa: FBT001 # UX meta: dict[str, Any] | None = None, ) -> dict[str, Any]: """ @@ -242,7 +242,7 @@ def _empty_field_result(name: str, version: float = 1.0) -> dict[str, Any]: def _prepare_field_result( obj: dict[str, Any], - passed: bool, # noqa: FBT001 + passed: bool, # noqa: FBT001 # UX value: Any, reason: str, return_value: Callable[[Any], Any] | None = None, @@ -271,7 +271,7 @@ def process(self, value: Any) -> None: if self.index < self._limit: self.sample.append(value) else: - r = random.randint(0, self.index) # noqa: S311 + r = random.randint(0, self.index) # noqa: S311 # non-cryptographic if r < self._limit: self.sample[r] = value