Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drop dependency on inflect (+typeguard&typing_extensions) #16

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions jaraco/text/show-newlines.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import autocommand
import inflect
from more_itertools import always_iterable

import jaraco.text
Expand All @@ -21,10 +20,8 @@ def report_newlines(filename):
"""
newlines = jaraco.text.read_newlines(filename)
count = len(tuple(always_iterable(newlines)))
engine = inflect.engine()
print(
engine.plural_noun("newline", count),
engine.plural_verb("is", count),
*(("newline", "is") if count == 1 else ("newlines", "are")),
repr(newlines),
)

Expand Down
1 change: 1 addition & 0 deletions newsfragments/16.misc.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Drop dependency on ``inflect`` -- by :user:`Avasam`
1 change: 0 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ dependencies = [
"jaraco.context >= 4.1",
'importlib_resources; python_version < "3.9"',
"autocommand",
"inflect",
"more_itertools",
]
dynamic = ["version"]
Expand Down
Loading