diff --git a/crates/build/re_types_builder/src/docs.rs b/crates/build/re_types_builder/src/docs.rs index 9b4e616cb1b75..8f8c626bd5f0d 100644 --- a/crates/build/re_types_builder/src/docs.rs +++ b/crates/build/re_types_builder/src/docs.rs @@ -404,11 +404,14 @@ mod doclink_translation { } } Target::Python => { + let mut path = format!("{kind}.{type_name}"); + if !scope.is_empty() { + path = format!("{scope}.{path}"); + } if let Some(field_or_enum_name) = field_or_enum_name { - format!("[`{kind}.{type_name}.{field_or_enum_name}`][rerun.{kind}.{type_name}.{field_or_enum_name}]") - } else { - format!("[`{kind}.{type_name}`][rerun.{kind}.{type_name}]") + path.push_str(&format!(".{field_or_enum_name}")); } + format!("[`{path}`][rerun.{path}]") } Target::WebDocsMarkdown => { // For instance, https://rerun.io/docs/reference/types/views/spatial2d_view @@ -530,7 +533,7 @@ mod doclink_translation { input, Target::Python ), - "A vector `[1, 2, 3]` and a doclink [`views.Spatial2DView`][rerun.views.Spatial2DView] and a [url](www.rerun.io)." + "A vector `[1, 2, 3]` and a doclink [`blueprint.views.Spatial2DView`][rerun.blueprint.views.Spatial2DView] and a [url](www.rerun.io)." ); assert_eq!( @@ -579,7 +582,7 @@ mod doclink_translation { input, Target::Python ), - "A vector `[1, 2, 3]` and a doclink [`views.Spatial2DView.position`][rerun.views.Spatial2DView.position] and a [url](www.rerun.io)." + "A vector `[1, 2, 3]` and a doclink [`blueprint.views.Spatial2DView.position`][rerun.blueprint.views.Spatial2DView.position] and a [url](www.rerun.io)." ); assert_eq!( diff --git a/rerun_py/rerun_sdk/rerun/blueprint/archetypes/background.py b/rerun_py/rerun_sdk/rerun/blueprint/archetypes/background.py index b17245fc3682a..bb1f2b4e236d4 100644 --- a/rerun_py/rerun_sdk/rerun/blueprint/archetypes/background.py +++ b/rerun_py/rerun_sdk/rerun/blueprint/archetypes/background.py @@ -50,7 +50,7 @@ def _clear(cls) -> Background: default=None, converter=components.ColorBatch._optional, # type: ignore[misc] ) - # Color used for the [`components.BackgroundKind.SolidColor`][rerun.components.BackgroundKind.SolidColor] background type. + # Color used for the [`blueprint.components.BackgroundKind.SolidColor`][rerun.blueprint.components.BackgroundKind.SolidColor] background type. # # (Docstring intentionally commented out to hide this field from the docs) diff --git a/rerun_py/rerun_sdk/rerun/blueprint/archetypes/container_blueprint.py b/rerun_py/rerun_sdk/rerun/blueprint/archetypes/container_blueprint.py index 08ebdf34a7770..05a575bbeb2e3 100644 --- a/rerun_py/rerun_sdk/rerun/blueprint/archetypes/container_blueprint.py +++ b/rerun_py/rerun_sdk/rerun/blueprint/archetypes/container_blueprint.py @@ -49,15 +49,15 @@ def __init__( col_shares: The layout shares of each column in the container. - For [`components.ContainerKind.Horizontal`][rerun.components.ContainerKind.Horizontal] containers, the length of this list should always match the number of contents. + For [`blueprint.components.ContainerKind.Horizontal`][rerun.blueprint.components.ContainerKind.Horizontal] containers, the length of this list should always match the number of contents. - Ignored for [`components.ContainerKind.Vertical`][rerun.components.ContainerKind.Vertical] containers. + Ignored for [`blueprint.components.ContainerKind.Vertical`][rerun.blueprint.components.ContainerKind.Vertical] containers. row_shares: The layout shares of each row of the container. - For [`components.ContainerKind.Vertical`][rerun.components.ContainerKind.Vertical] containers, the length of this list should always match the number of contents. + For [`blueprint.components.ContainerKind.Vertical`][rerun.blueprint.components.ContainerKind.Vertical] containers, the length of this list should always match the number of contents. - Ignored for [`components.ContainerKind.Horizontal`][rerun.components.ContainerKind.Horizontal] containers. + Ignored for [`blueprint.components.ContainerKind.Horizontal`][rerun.blueprint.components.ContainerKind.Horizontal] containers. active_tab: Which tab is active. @@ -71,7 +71,7 @@ def __init__( If unset, the grid layout will be auto. - Ignored for [`components.ContainerKind.Horizontal`][rerun.components.ContainerKind.Horizontal]/[`components.ContainerKind.Vertical`][rerun.components.ContainerKind.Vertical] containers. + Ignored for [`blueprint.components.ContainerKind.Horizontal`][rerun.blueprint.components.ContainerKind.Horizontal]/[`blueprint.components.ContainerKind.Vertical`][rerun.blueprint.components.ContainerKind.Vertical] containers. """ @@ -143,9 +143,9 @@ def _clear(cls) -> ContainerBlueprint: ) # The layout shares of each column in the container. # - # For [`components.ContainerKind.Horizontal`][rerun.components.ContainerKind.Horizontal] containers, the length of this list should always match the number of contents. + # For [`blueprint.components.ContainerKind.Horizontal`][rerun.blueprint.components.ContainerKind.Horizontal] containers, the length of this list should always match the number of contents. # - # Ignored for [`components.ContainerKind.Vertical`][rerun.components.ContainerKind.Vertical] containers. + # Ignored for [`blueprint.components.ContainerKind.Vertical`][rerun.blueprint.components.ContainerKind.Vertical] containers. # # (Docstring intentionally commented out to hide this field from the docs) @@ -156,9 +156,9 @@ def _clear(cls) -> ContainerBlueprint: ) # The layout shares of each row of the container. # - # For [`components.ContainerKind.Vertical`][rerun.components.ContainerKind.Vertical] containers, the length of this list should always match the number of contents. + # For [`blueprint.components.ContainerKind.Vertical`][rerun.blueprint.components.ContainerKind.Vertical] containers, the length of this list should always match the number of contents. # - # Ignored for [`components.ContainerKind.Horizontal`][rerun.components.ContainerKind.Horizontal] containers. + # Ignored for [`blueprint.components.ContainerKind.Horizontal`][rerun.blueprint.components.ContainerKind.Horizontal] containers. # # (Docstring intentionally commented out to hide this field from the docs) @@ -193,7 +193,7 @@ def _clear(cls) -> ContainerBlueprint: # # If unset, the grid layout will be auto. # - # Ignored for [`components.ContainerKind.Horizontal`][rerun.components.ContainerKind.Horizontal]/[`components.ContainerKind.Vertical`][rerun.components.ContainerKind.Vertical] containers. + # Ignored for [`blueprint.components.ContainerKind.Horizontal`][rerun.blueprint.components.ContainerKind.Horizontal]/[`blueprint.components.ContainerKind.Vertical`][rerun.blueprint.components.ContainerKind.Vertical] containers. # # (Docstring intentionally commented out to hide this field from the docs)