Add pylama.ini. Add pylama fixes.
This commit is contained in:
parent
7c417b7298
commit
4d275c855d
9
pylama.ini
Normal file
9
pylama.ini
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
[pylama]
|
||||||
|
linters = pep8,pyflakes
|
||||||
|
format = pylint
|
||||||
|
skip = *_ui.py
|
||||||
|
#ignore = E201,E202,E231,E701
|
||||||
|
|
||||||
|
|
||||||
|
[pep8]
|
||||||
|
max_line_length = 200
|
@ -1,10 +1,10 @@
|
|||||||
from PyQt5.QtGui import QPixmap
|
from PyQt5.QtGui import QPixmap
|
||||||
from PyQt5.QtWidgets import *
|
from PyQt5.QtWidgets import QMainWindow, QLabel,\
|
||||||
|
QFileDialog, QDialog, QDialogButtonBox, QVBoxLayout
|
||||||
from PyQt5.QtCore import Qt
|
from PyQt5.QtCore import Qt
|
||||||
from src.python.ui.mainwindow_ui import Ui_MainWindow
|
from src.python.ui.mainwindow_ui import Ui_MainWindow
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class MainWindow(QMainWindow, Ui_MainWindow):
|
class MainWindow(QMainWindow, Ui_MainWindow):
|
||||||
def __init__(self, parent=None):
|
def __init__(self, parent=None):
|
||||||
super(MainWindow, self).__init__(parent=parent)
|
super(MainWindow, self).__init__(parent=parent)
|
||||||
@ -47,7 +47,7 @@ class MainWindow(QMainWindow, Ui_MainWindow):
|
|||||||
file_formats = "All Files (*);;JPG (*.jpg);;PNG (*.png)"
|
file_formats = "All Files (*);;JPG (*.jpg);;PNG (*.png)"
|
||||||
file, _ = dialog.getOpenFileName(self, "QFileDialog.getOpenFileName()", "", file_formats, options=dialog.options())
|
file, _ = dialog.getOpenFileName(self, "QFileDialog.getOpenFileName()", "", file_formats, options=dialog.options())
|
||||||
if not file:
|
if not file:
|
||||||
msg = F"[!] Nie wybrano żadnego pliku."
|
msg = "[!] Nie wybrano żadnego pliku."
|
||||||
dialog = self.create_custom_dialog(title='Ostrzeżenie', msg=msg)
|
dialog = self.create_custom_dialog(title='Ostrzeżenie', msg=msg)
|
||||||
dialog.exec_()
|
dialog.exec_()
|
||||||
|
|
||||||
@ -85,7 +85,7 @@ class MainWindow(QMainWindow, Ui_MainWindow):
|
|||||||
file_formats = "All Files (*);;mp3 (*.mp3);;wav (*.wav)"
|
file_formats = "All Files (*);;mp3 (*.mp3);;wav (*.wav)"
|
||||||
file, _ = dialog.getOpenFileName(self, "QFileDialog.getOpenFileName()", "", file_formats, options=dialog.options())
|
file, _ = dialog.getOpenFileName(self, "QFileDialog.getOpenFileName()", "", file_formats, options=dialog.options())
|
||||||
if not file:
|
if not file:
|
||||||
msg = F"[!] Nie wybrano żadnego pliku."
|
msg = "[!] Nie wybrano żadnego pliku."
|
||||||
dialog = self.create_custom_dialog(title='Ostrzeżenie', msg=msg)
|
dialog = self.create_custom_dialog(title='Ostrzeżenie', msg=msg)
|
||||||
dialog.exec_()
|
dialog.exec_()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user