From f2d3f162632b9a8e25a5d0a1a701949cadf4fde3 Mon Sep 17 00:00:00 2001 From: Asadullah Shaikh Date: Thu, 12 Dec 2024 09:53:05 +0530 Subject: [PATCH] Suppress `configure()` type errors Signed-off-by: Asadullah Shaikh --- picamera2/picamera2.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/picamera2/picamera2.py b/picamera2/picamera2.py index 72f57e42..b1a5547a 100644 --- a/picamera2/picamera2.py +++ b/picamera2/picamera2.py @@ -1130,9 +1130,9 @@ def configure_(self, camera_config="preview") -> None: scaler_crops.append(par_crop[1] if camera_config["lores"]["preserve_ar"] else scaler_crops[0]) self.set_controls({"ScalerCrops": scaler_crops}) - def configure(self, camera_config="preview") -> None: - """Configure the camera system with the given configuration.""" - self.configure_(camera_config) + def configure(self, camera_config=None) -> None: + """Configure the camera system with the given configuration. Defaults to the 'preview' configuration.""" + self.configure_("preview" if camera_config is None else camera_config) def camera_configuration(self) -> dict: """Return the camera configuration."""