diff options
| author | Jason R. Coombs <jaraco@jaraco.com> | 2015-11-28 13:21:54 -0500 |
|---|---|---|
| committer | Jason R. Coombs <jaraco@jaraco.com> | 2015-11-28 13:21:54 -0500 |
| commit | 87ceb61bbb4a668539111efd84c5e0de7649e097 (patch) | |
| tree | 7021a8574f403e310c9b46d7c94461ba99c819ca /pkg_resources | |
| parent | 653987e5827beb668a2b32d9512fc7b238576155 (diff) | |
| download | python-setuptools-git-87ceb61bbb4a668539111efd84c5e0de7649e097.tar.gz | |
Add docstring
Diffstat (limited to 'pkg_resources')
| -rw-r--r-- | pkg_resources/__init__.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index 9a3ca36c..e4decac3 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -2467,6 +2467,10 @@ def _remove_md5_fragment(location): def _version_from_file(lines): + """ + Given an iterable of lines from a Metadata file, return + the value of the Version field, if present, or None otherwise. + """ is_version_line = lambda line: line.lower().startswith('version:') version_lines = filter(is_version_line, lines) line = next(iter(version_lines), '') |
