Skip to content

Commit 35ef94c

Browse files
DaxServerclaudegemini-code-assist[bot]
authored
fix: accept 'passed' as alias for 'pass' in FlickreviewR status (#80)
* fix: accept 'passed' as alias for 'pass' in FlickreviewR status Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * Update src/wikibots/flickr.py Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> --------- Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com> Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
1 parent 00686df commit 35ef94c

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

CLAUDE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ Deployed to Wikimedia Toolforge as containerized jobs. Build with `toolforge bui
6666

6767
`{{FlickreviewR |status= |author= |sourceurl= |reviewdate= |reviewlicense= |reviewer= |archive= }}`
6868

69-
The `status` parameter determines the review outcome. Only `pass` means the license is compatible. Other values: `fail`, `notmatching`, `error`, `nosource`, `notfound`, `pass-change`, `public-domain-mark`, `library-of-congress`, `powerhouse-museum`, `bad-author`.
69+
The `status` parameter determines the review outcome. Only `pass` means the license is compatible. The template supports aliases (see [[Template:FlickreviewR/status aliases]]) — `passed` is an alias for `pass`. Other values: `fail`/`failed`, `notmatching`, `error`, `nosource`, `notfound`, `pass-change`/`passed_changed`, `public-domain-mark`, `library-of-congress`, `powerhouse-museum`, `bad-author`.
7070

7171
### Constraints
7272

src/wikibots/flickr.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,8 @@ def extract_flickr_data(self) -> str | None:
8686
assert self.wiki_properties
8787

8888
review_status = self.retrieve_template_data(["FlickreviewR"], ["status"])
89-
if review_status != "pass":
90-
warning(f"Skipping: FlickreviewR status is {review_status!r}, not 'pass'")
89+
if review_status not in ("pass", "passed"):
90+
warning(f"Skipping: FlickreviewR status is {review_status!r}, not 'pass' or 'passed'")
9191
self.redis.set(self.wiki_properties.redis_key, 1)
9292
return None
9393

0 commit comments

Comments
 (0)