Skip to content

Commit f49cf7a

Browse files
committed
Fixing some codacy issue with unused imports, etc...
1 parent 6a28664 commit f49cf7a

File tree

1 file changed

+8
-11
lines changed

1 file changed

+8
-11
lines changed

src/windows/process_effect.py

+8-11
Original file line numberDiff line numberDiff line change
@@ -26,16 +26,13 @@
2626
"""
2727

2828
import os
29-
import sys
3029
import time
3130
import json
32-
import operator
3331
import functools
3432

3533
from PyQt5.QtCore import *
36-
from PyQt5.QtGui import QIcon, QStandardItemModel, QStandardItem, QBrush, QPalette
34+
from PyQt5.QtGui import QBrush
3735
from PyQt5.QtWidgets import *
38-
from PyQt5 import uic
3936
import openshot # Python module for libopenshot (required video editing module installed separately)
4037

4138
from classes import info, ui_util, settings, qt_types, updates
@@ -52,7 +49,7 @@ class ProcessEffect(QDialog):
5249
ui_path = os.path.join(info.PATH, 'windows', 'ui', 'process-effect.ui')
5350

5451
def __init__(self, clip_id, effect_name, effect_params):
55-
52+
5653
if not openshot.Clip().COMPILED_WITH_CV:
5754
raise ModuleNotFoundError("Openshot not compiled with OpenCV")
5855

@@ -319,20 +316,20 @@ def accept(self):
319316
processing = openshot.ClipProcessingJobs(self.effect_name, jsonString)
320317
processing.processClip(self.clip_instance, jsonString)
321318

322-
# TODO: This is just a temporary fix. We need to find a better way to allow the user to fix the error
323-
# The while loop is handling the error message. If pre-processing returns an error, a message
319+
# TODO: This is just a temporary fix. We need to find a better way to allow the user to fix the error
320+
# The while loop is handling the error message. If pre-processing returns an error, a message
324321
# will be displayed for 3 seconds and the effect will be closed.
325322
start = time.time()
326323
while processing.GetError():
327324
self.error_label.setText(processing.GetErrorMessage())
328325
self.error_label.repaint()
329-
if (time.time()-start)>3:
326+
if (time.time() - start) > 3:
330327
self.exporting = False
331328
processing.CancelProcessing()
332329
while(not processing.IsDone() ):
333330
continue
334331
super(ProcessEffect, self).reject()
335-
332+
336333
# get processing status
337334
while(not processing.IsDone() ):
338335
# update progressbar
@@ -348,12 +345,12 @@ def accept(self):
348345
processing.CancelProcessing()
349346

350347
if(not self.cancel_clip_processing):
351-
348+
352349
# Load processed data into effect
353350
self.effect = openshot.EffectInfo().CreateEffect(self.effect_name)
354351
self.effect.SetJson( '{"protobuf_data_path": "%s"}' % protobufPath )
355352
self.effect.Id(ID)
356-
353+
357354
# Accept dialog
358355
super(ProcessEffect, self).accept()
359356

0 commit comments

Comments
 (0)