From fa3104505295d065ed63cf3bc0a3a6d93c921b43 Mon Sep 17 00:00:00 2001 From: Dash Date: Sat, 17 Oct 2026 11:08:22 +0200 Subject: [PATCH] =?UTF-8?q?lingo:=20use=20"an"=20before=20words=20starting?= =?UTF-8?q?=20with=20=C3=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pqcli/lingo.py | 2 +- tests/test_lingo.py | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 tests/test_lingo.py diff --git a/pqcli/lingo.py b/pqcli/lingo.py index 3573bd5..43461d3 100644 --- a/pqcli/lingo.py +++ b/pqcli/lingo.py @@ -97,7 +97,7 @@ def plural(subject: str) -> str: def indefinite(subject: str, qty: int) -> str: if qty == 1: - if subject.startswith(tuple("AEIOU?aeiou?")): + if subject.startswith(tuple("AEIOUÜaeiouü")): return "an " + subject return "a " + subject return str(qty) + " " + plural(subject) diff --git a/tests/test_lingo.py b/tests/test_lingo.py new file mode 100644 index 0000000..4d96f27 --- /dev/null +++ b/tests/test_lingo.py @@ -0,0 +1,9 @@ +from pqcli.lingo import indefinite, to_roman + + +def test_indefinite_article() -> None: + assert indefinite("Orc", 1) == "an Orc" + assert indefinite("Ürn", 1) == "an Ürn" + assert indefinite("über-Orc", 1) == "an über-Orc" + assert indefinite("?", 1) == "a ?" + assert indefinite("Rat", 1) == "a Rat"