Skip to content

Clean up list of introspection commands#15535

Open
bonzini wants to merge 3 commits intomesonbuild:masterfrom
bonzini:intro-types
Open

Clean up list of introspection commands#15535
bonzini wants to merge 3 commits intomesonbuild:masterfrom
bonzini:intro-types

Conversation

@bonzini
Copy link
Contributor

@bonzini bonzini commented Feb 7, 2026

Trade off some unused arguments with simpler code: just make all the functions that implement introspection commands have the same signature.

@bonzini bonzini added the refactoring No behavior changes label Feb 7, 2026
Pass the arguments directly to the list_* functions instead of going through
a lambda, which is just what the no_bd case already does.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This is now clearer to mypy, so remove some useless checks.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
@bonzini bonzini marked this pull request as ready for review February 9, 2026 09:41
@bonzini bonzini requested a review from jpakkane as a code owner February 9, 2026 09:41
no_bd: T.Optional[T.Callable[[IntrospectionInterpreter], T.Union[dict, list]]] = None

def __post_init__(self) -> None:
self.desc += '.'
Copy link
Member

Choose a reason for hiding this comment

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

Isn't it easier to add the full stop to the string passed to the constructor and be done with it?

@bonzini bonzini added this to the 1.12 milestone Feb 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

refactoring No behavior changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants