Add pylama.ini. Add pylama fixes.
This commit is contained in:
parent
7c417b7298
commit
4d275c855d
2
main.py
2
main.py
@ -3,7 +3,7 @@ from PyQt5.QtWidgets import QApplication
|
||||
import sys
|
||||
|
||||
|
||||
if __name__=='__main__':
|
||||
if __name__ == '__main__':
|
||||
app = QApplication(sys.argv)
|
||||
w = MainWindow()
|
||||
w.show()
|
||||
|
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.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_()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user