From da693ba1727a7a42fa5e1134337601c53ce5850e Mon Sep 17 00:00:00 2001 From: Talley Lambert Date: Fri, 1 Dec 2023 14:48:34 -0600 Subject: [PATCH 1/2] update stubs --- pymmcore/__init__.pyi | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/pymmcore/__init__.pyi b/pymmcore/__init__.pyi index 972ec36..e111b0a 100644 --- a/pymmcore/__init__.pyi +++ b/pymmcore/__init__.pyi @@ -297,6 +297,21 @@ class CMMCore: """Enables or disables the operation of the continuous focusing hardware device.""" def enableDebugLog(self, enable: bool) -> None: """Enable or disable logging of debug messages.""" + def enableFeature(self, name: str, enable: bool) -> None: + """Enable or disable the given Core feature. + + Core features control whether experimental functionality (which is subject + to breaking changes) is exposed, or whether stricter API usage is enforced. + + Currently switchable features: + + - "StrictInitializationChecks" (default: disabled) When enabled, an + exception is thrown when an operation requiring an initialized device is + attempted on a device that is not successfully initialized. When disabled, + no exception is thrown and a warning is logged (and the operation may + potentially cause incorrect behavior or a crash). + + """ def enableStderrLog(self, enable: bool) -> None: """Enables or disables log message display on the standard console.""" def fullFocus(self) -> None: @@ -639,6 +654,11 @@ class CMMCore: """Returns the lock-in status of the continuous focusing device.""" def isExposureSequenceable(self, cameraLabel: str) -> bool: """Queries camera if exposure can be used in a sequence""" + def isFeatureEnabled(self, name: str) -> bool: + """Return whether the given Core feature is currently enabled. + + See `enableFeature()` for the available features. + """ def isGroupDefined(self, groupName: str) -> bool: """Checks if the group already exists.""" def isMultiROIEnabled(self) -> bool: From 454234b98b0c4be69e33e0bef0f12f63aa48e815 Mon Sep 17 00:00:00 2001 From: Talley Lambert Date: Fri, 1 Dec 2023 14:49:50 -0600 Subject: [PATCH 2/2] remove line --- pymmcore/__init__.pyi | 1 - 1 file changed, 1 deletion(-) diff --git a/pymmcore/__init__.pyi b/pymmcore/__init__.pyi index e111b0a..c1dcaab 100644 --- a/pymmcore/__init__.pyi +++ b/pymmcore/__init__.pyi @@ -310,7 +310,6 @@ class CMMCore: attempted on a device that is not successfully initialized. When disabled, no exception is thrown and a warning is logged (and the operation may potentially cause incorrect behavior or a crash). - """ def enableStderrLog(self, enable: bool) -> None: """Enables or disables log message display on the standard console."""