Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ENH: Expose ctkPythonConsoleCompleter on the public CTK API #1062

Merged
merged 1 commit into from
Jan 19, 2023

Conversation

lassoan
Copy link
Member

@lassoan lassoan commented Jan 19, 2023

Having ctkPythonConsoleCompleter class available on the public API allows applications to create custom completer implementations derived from this class.

For example, this is used in 3D Slicer to get completions with temporarily disabled logging during querying object properties. Temporary suppression of logging is needed because querying object properties leads to executing property getter methods in PythonQt objects. These getter methods may log errors/warnings because the method is deprecated or some inputs in the object have not been set yet. See Slicer/Slicer#6785.

fixes #1054

Having ctkPythonConsoleCompleter class available on the public API allows applications to create custom completer implementations derived from this class.

For example, this is used in 3D Slicer to get completions with temporarily disabled logging during querying object properties.
Temporary suppression of logging is needed because querying object properties leads to executing property getter methods in PythonQt objects.
These getter methods may log errors/warnings because the method is deprecated or some inputs in the object have not been set yet.
See Slicer/Slicer#6785.

fixes commontk#1054
@lassoan lassoan requested a review from jamesobutler January 19, 2023 16:28
@lassoan lassoan self-assigned this Jan 19, 2023
Copy link
Member

@pieper pieper left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@lassoan lassoan merged commit 95dac75 into commontk:master Jan 19, 2023
@lassoan lassoan deleted the python-completer-customization branch January 19, 2023 16:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Python completer can display warnings and errors in the console
2 participants