Skip to content

Commit

Permalink
linting: apply ruff format
Browse files Browse the repository at this point in the history
  • Loading branch information
jayaddison committed Dec 2, 2024
1 parent 7b20111 commit 23d4bf4
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 28 deletions.
12 changes: 6 additions & 6 deletions tests/test_classical_all.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ def test_classical(self):
# DEFAULT...

assert p.plural_noun("error", 0) == "errors", "classical 'zero' not active"
assert (
p.plural_noun("wildebeest") == "wildebeests"
), "classical 'herd' not active"
assert p.plural_noun("wildebeest") == "wildebeests", (
"classical 'herd' not active"
)
assert p.plural_noun("Sally") == "Sallys", "classical 'names' active"
assert p.plural_noun("brother") == "brothers", "classical others not active"
assert p.plural_noun("person") == "people", "classical 'persons' not active"
Expand All @@ -30,9 +30,9 @@ def test_classical(self):

p.classical(all=False)
assert p.plural_noun("error", 0) == "errors", "classical 'zero' not active"
assert (
p.plural_noun("wildebeest") == "wildebeests"
), "classical 'herd' not active"
assert p.plural_noun("wildebeest") == "wildebeests", (
"classical 'herd' not active"
)
assert p.plural_noun("Sally") == "Sallies", "classical 'names' not active"
assert p.plural_noun("brother") == "brothers", "classical others not active"
assert p.plural_noun("person") == "people", "classical 'persons' not active"
Expand Down
8 changes: 4 additions & 4 deletions tests/test_numwords.py
Original file line number Diff line number Diff line change
Expand Up @@ -198,19 +198,19 @@ def test_array():
],
[
"123456",
"one hundred and twenty-three thousand, " "four hundred and fifty-six",
"one hundred and twenty-three thousand, four hundred and fifty-six",
"one, two, three, four, five, six",
"twelve, thirty-four, fifty-six",
"one twenty-three, four fifty-six",
"one hundred and twenty-three thousand, " "four hundred and fifty-sixth",
"one hundred and twenty-three thousand, four hundred and fifty-sixth",
],
[
"0123456",
"one hundred and twenty-three thousand, " "four hundred and fifty-six",
"one hundred and twenty-three thousand, four hundred and fifty-six",
"zero, one, two, three, four, five, six",
"zero one, twenty-three, forty-five, six",
"zero twelve, three forty-five, six",
"one hundred and twenty-three thousand, " "four hundred and fifty-sixth",
"one hundred and twenty-three thousand, four hundred and fifty-sixth",
],
[
"1234567",
Expand Down
36 changes: 18 additions & 18 deletions tests/test_pwd.py
Original file line number Diff line number Diff line change
Expand Up @@ -262,9 +262,9 @@ def test_pl(self):
(p.plural_adj, "cat's", "cats'"),
(p.plural_adj, "child's", "children's"),
):
assert (
fn(sing) == plur
), f'{fn.__name__}("{sing}") == "{fn(sing)}" != "{plur}"'
assert fn(sing) == plur, (
f'{fn.__name__}("{sing}") == "{fn(sing)}" != "{plur}"'
)

for sing, num, plur in (
("cow", 1, "cow"),
Expand Down Expand Up @@ -341,9 +341,9 @@ def test_gender(self):
("to her", "to them"),
("to herself", "to themselves"),
):
assert (
p.singular_noun(plur) == sing
), f"singular_noun({plur}) == {p.singular_noun(plur)} != {sing}"
assert p.singular_noun(plur) == sing, (
f"singular_noun({plur}) == {p.singular_noun(plur)} != {sing}"
)
assert p.inflect("singular_noun('%s')" % plur) == sing

p.gender("masculine")
Expand All @@ -354,9 +354,9 @@ def test_gender(self):
("to him", "to them"),
("to himself", "to themselves"),
):
assert (
p.singular_noun(plur) == sing
), f"singular_noun({plur}) == {p.singular_noun(plur)} != {sing}"
assert p.singular_noun(plur) == sing, (
f"singular_noun({plur}) == {p.singular_noun(plur)} != {sing}"
)
assert p.inflect("singular_noun('%s')" % plur) == sing

p.gender("gender-neutral")
Expand All @@ -367,9 +367,9 @@ def test_gender(self):
("to them", "to them"),
("to themself", "to themselves"),
):
assert (
p.singular_noun(plur) == sing
), f"singular_noun({plur}) == {p.singular_noun(plur)} != {sing}"
assert p.singular_noun(plur) == sing, (
f"singular_noun({plur}) == {p.singular_noun(plur)} != {sing}"
)
assert p.inflect("singular_noun('%s')" % plur) == sing

p.gender("neuter")
Expand All @@ -380,9 +380,9 @@ def test_gender(self):
("to it", "to them"),
("to itself", "to themselves"),
):
assert (
p.singular_noun(plur) == sing
), f"singular_noun({plur}) == {p.singular_noun(plur)} != {sing}"
assert p.singular_noun(plur) == sing, (
f"singular_noun({plur}) == {p.singular_noun(plur)} != {sing}"
)
assert p.inflect("singular_noun('%s')" % plur) == sing

with pytest.raises(BadGenderError):
Expand Down Expand Up @@ -612,9 +612,9 @@ def test__plnoun(self):
("zoo", "zoos"),
("tomato", "tomatoes"),
):
assert (
p._plnoun(sing) == plur
), f'p._plnoun("{sing}") == {p._plnoun(sing)} != "{plur}"'
assert p._plnoun(sing) == plur, (
f'p._plnoun("{sing}") == {p._plnoun(sing)} != "{plur}"'
)

assert p._sinoun(plur) == sing, f'p._sinoun("{plur}") != "{sing}"'

Expand Down

0 comments on commit 23d4bf4

Please sign in to comment.