Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def crop(self):
"""Crop data."""
fs = self.model.current["data"].info["sfreq"]
length = self.model.current["data"].n_times / fs
dialog = CropDialog(self, 0, length)
if dialog.exec_():
self.auto_duplicate()
self.model.crop(dialog.start or 0, dialog.stop)