Skip to content

Commit 3562973

Browse files
committed
remove bad to_list() call, add missing doc
1 parent 58aae63 commit 3562973

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

python/private/py_library.bzl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -234,10 +234,10 @@ def _get_imports_and_venv_symlinks(ctx, semantics):
234234
if VenvsSitePackages.is_enabled(ctx):
235235
package, version_str = _get_package_and_version(ctx)
236236
imports = ctx.attr.imports
237-
if len(imports) == 0:
237+
if len(imports.to_list()) == 0:
238238
fail("When venvs_site_packages is enabled, exactly one `imports` " +
239239
"value must be specified, got 0")
240-
elif len(imports) > 1:
240+
elif len(imports.to_list()) > 1:
241241
fail("When venvs_site_packages is enabled, exactly one `imports` " +
242242
"value must be specified, got {}".format(imports))
243243

python/private/venv_runfiles.bzl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,9 @@ def get_venv_symlinks(ctx, files, package, version_str, site_packages_root):
198198
199199
Args:
200200
ctx: {type}`ctx` the current ctx.
201+
files: {type}`list[File]` the underlying files that are under
202+
`site_packages_root` and intended to be part of the venv
203+
contents.
201204
package: {type}`str` the Python distribution name.
202205
version_str: {type}`str` the distribution's version.
203206
site_packages_root: {type}`str` prefix under which files are

0 commit comments

Comments
 (0)