Skip to content

Commit

Permalink
chore: Document noqa usage
Browse files Browse the repository at this point in the history
  • Loading branch information
jpmckinney committed Sep 15, 2024
1 parent 82738f7 commit 271bda3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion dataset/unique/tender_id.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
6 changes: 3 additions & 3 deletions pelican/util/checks.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]:
"""
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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

Expand Down

0 comments on commit 271bda3

Please sign in to comment.