Skip to content

Commit

Permalink
Suppress configure() type errors
Browse files Browse the repository at this point in the history
Signed-off-by: Asadullah Shaikh <[email protected]>
  • Loading branch information
pantheraleo-7 committed Dec 17, 2024
1 parent 043d20e commit f2d3f16
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions picamera2/picamera2.py
Original file line number Diff line number Diff line change
Expand Up @@ -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."""
Expand Down

0 comments on commit f2d3f16

Please sign in to comment.