Skip to content

Commit abc4fd1

Browse files
committed
Format using black
Format using black Sort imports Update requeriments.txt Change os.path for pathlib.Path
1 parent 6e5ba85 commit abc4fd1

13 files changed

+558
-491
lines changed

.github/workflows/release.yml

+1
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ jobs:
3030
id: build_x64_release
3131
run: |
3232
C:\Miniconda\condabin\conda.bat activate base
33+
python -m pip install --upgrade pip setuptools wheel
3334
python setup.py pyinstaller
3435
- name: Create Release
3536
id: create_release

.gitignore

+21-6
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,29 @@
11
*.pyc
2-
*.mp3
3-
*.mp4
2+
*.srt
3+
*.ttml
4+
*.sbv
5+
*.vtt
46
*.flv
7+
*.mp4
8+
*.m4a
9+
*.m4v
10+
*.mp3
11+
*.3gp
12+
*.wav
13+
*.ape
14+
*.mkv
15+
*.swf
16+
*.part
17+
.idea
518
.vscode
619
env
7-
build
8-
dist
20+
env/
21+
dist/
22+
build/
23+
*venv/
24+
*venv.back/
925
*.spec
1026
*.egg-info
1127
old/
1228
*.part
13-
.idea
14-
.DS_Store
29+
.DS_Store

GUI/AboutDialog.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@
44

55
class AboutDialog(QtWidgets.QDialog):
66
def __init__(self, parent=None):
7-
super(AboutDialog, self).__init__(parent, QtCore.Qt.WindowSystemMenuHint | QtCore.Qt.WindowTitleHint)
7+
super(AboutDialog, self).__init__(parent, QtCore.Qt.WindowSystemMenuHint | QtCore.Qt.WindowTitleHint) # type: ignore
88
self.ui = Ui_Dialog()
99
self.ui.setupUi(self)

GUI/BatchAddUrls.py

+10-8
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@
44

55
class BatchAddDialogue(QtWidgets.QDialog):
66
def __init__(self, parent=None):
7-
super(BatchAddDialogue, self).__init__(parent, QtCore.Qt.WindowSystemMenuHint | QtCore.Qt.WindowTitleHint)
7+
super(BatchAddDialogue, self).__init__(
8+
parent, QtCore.Qt.WindowSystemMenuHint | QtCore.Qt.WindowTitleHint
9+
) # type: ignore
810
self.ui = Ui_BatchAdd()
911
self.ui.setupUi(self)
1012
self.download = False
@@ -14,24 +16,24 @@ def __init__(self, parent=None):
1416

1517
def browse_clicked(self):
1618
file_name, _ = QtWidgets.QFileDialog.getOpenFileName(
17-
self, "Select txt file", filter='*.txt'
19+
self, "Select txt file", filter="*.txt"
1820
)
1921

20-
if file_name == '':
22+
if not file_name:
2123
return
22-
with open(file_name, 'r') as file_data:
24+
25+
with open(file_name, "r") as file_data:
2326
for line in file_data.readlines():
2427
self.ui.UrlList.append(line.strip())
2528

2629
def add_clicked(self):
27-
if str(self.ui.UrlList.toPlainText()).strip() == '':
30+
_have_urls = str(self.ui.UrlList.toPlainText()).strip() # != ''
31+
if not _have_urls:
2832
QtWidgets.QMessageBox.information(self, "Error!", "No urls given!")
29-
return
3033
else:
3134
self.download = True
3235
self.close()
33-
36+
3437
def close_clicked(self):
3538
self.download = False
3639
self.close()
37-

GUI/LicenseDialog.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
class LicenseDialogue(QtWidgets.QDialog):
66
def __init__(self, parent=None):
7-
super(LicenseDialogue, self).__init__(parent, QtCore.Qt.WindowSystemMenuHint | QtCore.Qt.WindowTitleHint)
7+
super(LicenseDialogue, self).__init__(parent, QtCore.Qt.WindowSystemMenuHint | QtCore.Qt.WindowTitleHint) # type: ignore
88
self.ui = Ui_Dialog()
99
self.ui.setupUi(self)
10-
self.ui.ExitButton.clicked.connect(self.close)
10+
self.ui.ExitButton.clicked.connect(self.close)

0 commit comments

Comments
 (0)