Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

Wumpf
Copy link
Member

@Wumpf Wumpf commented Jul 14, 2025

I wanted to turn off the 3D grid lines for one of our examples and found it a bit annoying to do. This makes it a lot easier:

Before:

rrb.Spatial3DView(line_grid=rrb.archetypes.LineGrid3D(line_grid=False)),

After:

rrb.Spatial3DView(line_grid=False),

@Wumpf Wumpf added sdk-python Python logging API 🟦 blueprint The data that defines our UI include in changelog labels Jul 14, 2025
@Wumpf Wumpf force-pushed the andreas/easier-lines-turn-off branch from 7663993 to c12f347 Compare July 14, 2025 11:02
@Wumpf Wumpf force-pushed the andreas/easier-lines-turn-off branch from c12f347 to 976c907 Compare July 15, 2025 15:11
Copy link
Member

@ntjohnson1 ntjohnson1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Two small nits. Otherwise looks great

def __init__(
self: Any,
visible: datatypes.BoolLike | None = None,
*,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From a python perspective kwarg, *, more_kwargs looks a little weird but it looks like it works and wouldn't really break anything.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My python isn't that amazing, how else would you do it?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Generally in python we don't include the * and let people use positional or keywords args. We seem to use this pattern here rejecting positional args for convenience in wrapping things.

Short answer I'm not sure if we actually need the * to make the extensions work. If we do then this is totally reasonable with that context but a little weird since python typically doesn't allow positional arguments after keyword arguments.

@Wumpf Wumpf merged commit 033b966 into main Jul 15, 2025
39 checks passed
@Wumpf Wumpf deleted the andreas/easier-lines-turn-off branch July 15, 2025 15:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🟦 blueprint The data that defines our UI include in changelog sdk-python Python logging API
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants