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 | b062cf374956302edf12fa2ac4407af90b06bc19 (patch) | |
tree | 2ea5a186241d548e90325f97ba767a66b4fa7c33 | |
parent | cb6324e6e7d712c68fa20ca40ed2f256486fc54e (diff) | |
download | python-setuptools-bitbucket-b062cf374956302edf12fa2ac4407af90b06bc19.tar.gz |
Add docstring
-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), '') |