Skip to content

Commit

Permalink
Re-use yield_lines from jaraco.text
Browse files Browse the repository at this point in the history
  • Loading branch information
jaraco committed Dec 11, 2022
1 parent 5b66160 commit c72c1dd
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 34 deletions.
5 changes: 2 additions & 3 deletions pip_run/scripts.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,9 @@
import contextlib

import packaging.requirements
import jaraco.text
from jaraco.context import suppress

from . import text


class Dependencies(list):
index_url = None
Expand Down Expand Up @@ -71,7 +70,7 @@ def read(self):
['foo', 'bar']
"""
raw_reqs = self._read('__requires__')
reqs_items = text.items(raw_reqs)
reqs_items = jaraco.text.yield_lines(raw_reqs)
reqs = map(packaging.requirements.Requirement, reqs_items)
strings = map(str, reqs)
deps = Dependencies(strings)
Expand Down
31 changes: 0 additions & 31 deletions pip_run/text.py

This file was deleted.

1 change: 1 addition & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ install_requires =
packaging
more_itertools
jaraco.context
jaraco.text

[options.packages.find]
exclude =
Expand Down

0 comments on commit c72c1dd

Please sign in to comment.