We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 6203429 + d082e11 commit d69c43bCopy full SHA for d69c43b
pip/commands/search.py
@@ -85,7 +85,13 @@ def transform_hits(hits):
85
return package_list
86
87
88
-def print_results(hits, name_column_width=25, terminal_width=None):
+def print_results(hits, name_column_width=None, terminal_width=None):
89
+ if not hits:
90
+ return
91
+ if name_column_width is None:
92
+ name_column_width = max(
93
+ [len(hit['name']) + len(hit.get('versions', ['-'])[-1])
94
+ for hit in hits]) + 4
95
installed_packages = [p.project_name for p in pkg_resources.working_set]
96
for hit in hits:
97
name = hit['name']
0 commit comments