Add pylama.ini. Add pylama fixes.

This commit is contained in:
Jarosław Wieczorek 2020-12-20 12:31:46 +01:00
parent 7c417b7298
commit 4d275c855d
3 changed files with 15 additions and 6 deletions

9
pylama.ini Normal file
View File

@ -0,0 +1,9 @@
[pylama]
linters = pep8,pyflakes
format = pylint
skip = *_ui.py
#ignore = E201,E202,E231,E701
[pep8]
max_line_length = 200

View File

@ -1,10 +1,10 @@
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 src.python.ui.mainwindow_ui import Ui_MainWindow
class MainWindow(QMainWindow, Ui_MainWindow):
def __init__(self, parent=None):
super(MainWindow, self).__init__(parent=parent)
@ -47,7 +47,7 @@ class MainWindow(QMainWindow, Ui_MainWindow):
file_formats = "All Files (*);;JPG (*.jpg);;PNG (*.png)"
file, _ = dialog.getOpenFileName(self, "QFileDialog.getOpenFileName()", "", file_formats, options=dialog.options())
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.exec_()
@ -85,7 +85,7 @@ class MainWindow(QMainWindow, Ui_MainWindow):
file_formats = "All Files (*);;mp3 (*.mp3);;wav (*.wav)"
file, _ = dialog.getOpenFileName(self, "QFileDialog.getOpenFileName()", "", file_formats, options=dialog.options())
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.exec_()