File tree Expand file tree Collapse file tree 1 file changed +14
-10
lines changed
Expand file tree Collapse file tree 1 file changed +14
-10
lines changed Original file line number Diff line number Diff line change @@ -241,16 +241,20 @@ def create_pyproject_from_package(cls, package: Package) -> TOMLDocument:
241241 if package .classifiers :
242242 content ["classifiers" ] = package .classifiers
243243
244- for key , attr in {
245- ("documentation" , "documentation_url" ),
246- ("repository" , "repository_url" ),
247- ("homepage" , "homepage" ),
248- ("maintainers" , "maintainers" ),
249- ("keywords" , "keywords" ),
250- }:
251- value = getattr (package , attr , None )
252- if value :
253- content [key ] = value
244+ if package .documentation_url :
245+ content ["documentation" ] = package .documentation_url
246+
247+ if package .repository_url :
248+ content ["repository" ] = package .repository_url
249+
250+ if package .homepage :
251+ content ["homepage" ] = package .homepage
252+
253+ if package .maintainers :
254+ content ["maintainers" ] = package .maintainers
255+
256+ if package .keywords :
257+ content ["keywords" ] = package .keywords
254258
255259 readmes = []
256260
You can’t perform that action at this time.
0 commit comments