Skip to content

Commit 837050b

Browse files
authored
conditionally log unused annotations (#629)
1 parent c6357a6 commit 837050b

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

python/pip_install/extract_wheels/lib/annotation.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,10 @@ def collect(self, requirements: List[str]) -> Dict[str, Annotation]:
8181
if pkg in unused:
8282
collection.update({pkg: unused.pop(pkg)})
8383

84-
logging.warning("Unused annotations: {}".format(sorted(list(unused.keys()))))
84+
if unused:
85+
logging.warning(
86+
"Unused annotations: {}".format(sorted(list(unused.keys())))
87+
)
8588

8689
return collection
8790

0 commit comments

Comments
 (0)