mirror of
https://github.com/rr-/pq-cli.git
synced 2026-11-12 22:40:36 -07:00
lingo: use "an" before words starting with Ü
This commit is contained in:
2 files changed
+10
-1
No files matched your search
+1
-1
@@ -97,7 +97,7 @@ def plural(subject: str) -> str:
|
|||||||
|
|
||||||
def indefinite(subject: str, qty: int) -> str:
|
def indefinite(subject: str, qty: int) -> str:
|
||||||
if qty == 1:
|
if qty == 1:
|
||||||
if subject.startswith(tuple("AEIOU?aeiou?")):
|
if subject.startswith(tuple("AEIOUÜaeiouü")):
|
||||||
return "an " + subject
|
return "an " + subject
|
||||||
return "a " + subject
|
return "a " + subject
|
||||||
return str(qty) + " " + plural(subject)
|
return str(qty) + " " + plural(subject)
|
||||||
|
|||||||
@@ -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"
|
||||||
Reference in new issue
Block a user