Skip to content

Commit

Permalink
Tweak message
Browse files Browse the repository at this point in the history
  • Loading branch information
bhrutledge committed Jan 22, 2022
1 parent c2ed7f7 commit f4a390a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
3 changes: 1 addition & 2 deletions tests/test_package.py
Expand Up @@ -375,8 +375,7 @@ def test_pkginfo_returns_no_metadata(read_data, missing_fields, monkeypatch):
package_file.PackageFile.from_filename(filename, comment=None)

assert (
f"Distribution metadata is missing required fields: {missing_fields}."
in err.value.args[0]
f"Metadata is missing required fields: {missing_fields}." in err.value.args[0]
)
assert "1.0, 1.1, 1.2, 2.0, 2.1, 2.2" in err.value.args[0]

Expand Down
8 changes: 4 additions & 4 deletions twine/package.py
Expand Up @@ -111,10 +111,10 @@ def from_filename(cls, filename: str, comment: Optional[str]) -> "PackageFile":
if missing_fields:
supported_metadata = list(pkginfo.distribution.HEADER_ATTRS)
raise exceptions.InvalidDistribution(
"Distribution metadata is missing required fields: "
f"{', '.join(missing_fields)}. "
"Make sure that the distribution includes the files where those fields "
"are specified, and that you're using a supported Metadata-Version: "
"Metadata is missing required fields: "
f"{', '.join(missing_fields)}.\n"
"Make sure the distribution includes the files where those fields "
"are specified, and is using a supported Metadata-Version: "
f"{', '.join(supported_metadata)}."
)

Expand Down

0 comments on commit f4a390a

Please sign in to comment.