From 1df93bdbe3bd3cc8b7c61b8a1142a6ed444a8b3e Mon Sep 17 00:00:00 2001 From: Paul Hebble Date: Sun, 19 May 2024 10:44:43 -0500 Subject: [PATCH] Tiny coding style tweaks Remove redundant type parameter Just keep incomplete checks' names --- Core/Registry/CompatibilitySorter.cs | 2 +- bin/ckan_merge_pr.py | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Core/Registry/CompatibilitySorter.cs b/Core/Registry/CompatibilitySorter.cs index b956b0be2b..a6fade8a18 100644 --- a/Core/Registry/CompatibilitySorter.cs +++ b/Core/Registry/CompatibilitySorter.cs @@ -259,7 +259,7 @@ public ICollection LatestIncompatible /// private IEnumerable RelationshipIdentifiers(RelationshipDescriptor rel) => rel is ModuleRelationshipDescriptor modRel - ? Enumerable.Repeat(modRel.name, 1) + ? Enumerable.Repeat(modRel.name, 1) : rel is AnyOfRelationshipDescriptor anyRel ? anyRel.any_of.SelectMany(RelationshipIdentifiers) : Enumerable.Empty(); diff --git a/bin/ckan_merge_pr.py b/bin/ckan_merge_pr.py index 3a6824b3ca..5d99564e7f 100755 --- a/bin/ckan_merge_pr.py +++ b/bin/ckan_merge_pr.py @@ -154,12 +154,13 @@ def merge_into(self, repo: CkanRepo, self_review: bool) -> bool: print(f'PR #{self.pull_request.number} commit {self.pull_request.head.sha} not found!') return False pr_commits = self.pull_request.get_commits() - incomplete_checks = [run - for run in pr_commits[pr_commits.totalCount - 1].get_check_runs() + incomplete_checks = [run.name + for run + in pr_commits[pr_commits.totalCount - 1].get_check_runs() if run.status != 'completed' or run.conclusion not in ('success', 'skipped')] if incomplete_checks: - print('Incomplete checks:', ', '.join(ch.name for ch in incomplete_checks)) + print('Incomplete checks:', ', '.join(incomplete_checks)) return False # Valid; do it! # repo.index.merge_tree doesn't auto resolve conflicts