Skip to content

Commit 2a5d082

Browse files
pipcl.py: pipcl.py: ignore None items in lists.
Simplifies specification of packages.
1 parent 766b3ee commit 2a5d082

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

pipcl.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -364,7 +364,7 @@ def __init__(self,
364364
* https://pypi.org/classifiers/
365365
366366
requires_dist:
367-
A string or list of strings. Also see PEP-508.
367+
A string or list of strings. None items are ignored. Also see PEP-508.
368368
requires_python:
369369
A string or list of strings.
370370
requires_external:
@@ -489,6 +489,7 @@ def __init__(self,
489489
Used as `zipfile.ZipFile()`'s `compresslevel` parameter when
490490
creating wheels.
491491
492+
Occurrences of `None` in lists are ignored.
492493
'''
493494
assert name
494495
assert version
@@ -1261,7 +1262,8 @@ def add(key, value):
12611262
return
12621263
if isinstance( value, (tuple, list)):
12631264
for v in value:
1264-
add( key, v)
1265+
if v is not None:
1266+
add( key, v)
12651267
return
12661268
if key == 'License' and '\n' in value:
12671269
# This is ok because we write `self.license` into

0 commit comments

Comments
 (0)