File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed
Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -144,13 +144,11 @@ def read_pkg_file(self, file):
144144 self .license_files = _read_list_from_msg (msg , 'license-file' )
145145
146146
147- def ensure_summary_single_line (val ):
148- """Validate that the summary does not have line breaks."""
147+ def single_line (val ):
148+ """Validate that the value does not have line breaks."""
149149 # Ref: https://github.com/pypa/setuptools/issues/1390
150150 if '\n ' in val :
151- raise ValueError (
152- 'Newlines in the package distribution summary are not allowed' ,
153- )
151+ raise ValueError ('Newlines are not allowed' )
154152
155153 return val
156154
@@ -166,7 +164,7 @@ def write_field(key, value):
166164 write_field ('Metadata-Version' , str (version ))
167165 write_field ('Name' , self .get_name ())
168166 write_field ('Version' , self .get_version ())
169- write_field ('Summary' , ensure_summary_single_line (self .get_description ()))
167+ write_field ('Summary' , single_line (self .get_description ()))
170168 write_field ('Home-page' , self .get_url ())
171169
172170 optional_fields = (
You can’t perform that action at this time.
0 commit comments