Skip to content

Commit

Permalink
Rewrite docstrings to clarify the expected output format, and why we …
Browse files Browse the repository at this point in the history
…need quoting
  • Loading branch information
jherland committed Mar 19, 2023
1 parent 9b165a9 commit 33eb7b4
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions importlib_metadata/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -498,10 +498,10 @@ def _read_files_distinfo(self):

def _read_files_egginfo_installed(self):
"""
installed-files.txt might contain literal commas, so wrap
each line in quotes. Also, the entries in installed-files.txt
are relative to the .egg-info/ subdir (not relative to the
parent site-packages directory that make_file() expects).
Read installed-files.txt and return lines in a similar
CSV-parsable format as RECORD: each file must be placed
relative to the site-packages directory, and must also be
quoted (since file names can contain literal commas).
This file is written when the package is installed by pip,
but it might not be written for other installation methods.
Expand All @@ -526,8 +526,9 @@ def _read_files_egginfo_installed(self):

def _read_files_egginfo_sources(self):
"""
SOURCES.txt might contain literal commas, so wrap each line
in quotes.
Read SOURCES.txt and return lines in a similar CSV-parsable
format as RECORD: each file name must be quoted (since it
might contain literal commas).
Note that SOURCES.txt is not a reliable source for what
files are installed by a package. This file is generated
Expand Down

0 comments on commit 33eb7b4

Please sign in to comment.