Skip to content

Commit

Permalink
Merge pull request #29 from candleindark/enh
Browse files Browse the repository at this point in the history
Suppress ruff T201 complain for a print statement
  • Loading branch information
candleindark authored Nov 27, 2024
2 parents 0f7740e + 298ddab commit d113898
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/dandisets_linkml_status_tools/cli/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ def main(
validation_reports.append(report_on_draft)

# Print summary of validation reports
print(
print( # noqa: T201
"\n".join(
f"dandiset: {r.dandiset_identifier}, "
f"linkml: {len(r.linkml_validation_errs)}, "
Expand Down
5 changes: 3 additions & 2 deletions src/dandisets_linkml_status_tools/cli/tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -448,12 +448,13 @@ def count_err(e_: ValidationResult) -> None:

def compile_counts() -> list[tuple[JsonschemaValidationErrorType, int]]:
def sorting_key(
c: tuple[JsonschemaValidationErrorType, int]
c: tuple[JsonschemaValidationErrorType, int],
) -> tuple[str, int]:
return c[0].validator, -c[1]

return sorted(
chain.from_iterable(zip(t, c, strict=False) for t, c in counter.values()), key=sorting_key
chain.from_iterable(zip(t, c, strict=False) for t, c in counter.values()),
key=sorting_key,
)

# A dictionary that keeps the counts of individual types of JSON schema validation
Expand Down

0 comments on commit d113898

Please sign in to comment.