@@ -373,7 +373,8 @@ def lock(
373373 python_version = None ,
374374 strip_extras = False ,
375375 target_compatible_with = None ,
376- tags = ["manual" ]):
376+ tags = ["manual" ],
377+ visibility = None ):
377378 """Pin the requirements based on the src files.
378379
379380 This macro creates the following targets:
@@ -416,6 +417,7 @@ def lock(
416417 tags: The common tags for all of the targets. This defaults to [`manual`].
417418 Note, that the locking target also adds `requires-network` and
418419 `no-cache` due to the nature of how `uv` works.
420+ visibility: {attr}`list[str]` The visibility of the documented targets.
419421 """
420422 update_target = "{}.update" .format (name )
421423 locker_target = "{}.run" .format (name )
@@ -450,6 +452,7 @@ def lock(
450452 "no-cache" ,
451453 "requires-network" ,
452454 ] + tags ,
455+ visibility = visibility ,
453456 )
454457
455458 # A target for updating the in-tree version directly by skipping the in-action
@@ -463,6 +466,7 @@ def lock(
463466 "//conditions:default" : False ,
464467 }),
465468 tags = tags ,
469+ visibility = visibility ,
466470 )
467471
468472 # FIXME @aignas 2025-03-20: is it possible to extend `py_binary` so that the
@@ -482,4 +486,5 @@ def lock(
482486 srcs = [template_target ],
483487 data = [name ] + ([maybe_out ] if maybe_out else []),
484488 tags = tags ,
489+ visibility = visibility ,
485490 )
0 commit comments