From e87942c73193e93f44efcb85b1cf6fc40a0e5d78 Mon Sep 17 00:00:00 2001 From: Luke Hubmayer-Werner Date: Wed, 19 Jul 2023 17:51:03 +0930 Subject: [PATCH] remove duplicated import lines --- ff5reader.py | 53 ---------------------------------------------------- 1 file changed, 53 deletions(-) diff --git a/ff5reader.py b/ff5reader.py index 9630b98..27a6e33 100755 --- a/ff5reader.py +++ b/ff5reader.py @@ -38,64 +38,11 @@ import includes.const as const import includes.ff4 as ff4 import includes.ff6 as ff6 -pyqt_version = 0 -skip_pyqt5 = 'PYQT4' in os.environ filename_en = 'Final Fantasy V (Japan) [En by RPGe v1.1].sfc' filename_jp = 'Final Fantasy V (Japan).sfc' filename_jp_ff4 = 'Final Fantasy IV (Japan) (Rev A).sfc' filename_jp_ff6 = 'Final Fantasy VI (Japan).sfc' -if not skip_pyqt5: - try: - from PyQt5 import QtGui, QtCore - from PyQt5.QtGui import QIcon, QPalette, QColor, QFont, QFontInfo, QImage, QPixmap - from PyQt5.QtWidgets import ( - QApplication, QMainWindow, QFormLayout, - QGridLayout, QHBoxLayout, QVBoxLayout, - QAbstractItemView, QHeaderView, QListWidget, - QListWidgetItem, QTabWidget, QTableWidget, - QTableWidgetItem, QFrame, QScrollArea, - QStackedWidget, QWidget, QCheckBox, QComboBox, - QDoubleSpinBox, QGroupBox, QLineEdit, - QPushButton, QRadioButton, QSpinBox, - QStyleOptionButton, QToolButton, QProgressBar, - QDialog, QColorDialog, QDialogButtonBox, - QFileDialog, QInputDialog, QMessageBox, - QAction, QActionGroup, QLabel, QMenu, QStyle, - QSystemTrayIcon, QStyleOptionProgressBar - ) - pyqt_version = 5 - except ImportError: - print("Couldn't import Qt5 dependencies. " - 'Make sure you installed the PyQt5 package.') -if pyqt_version == 0: - try: - import sip - sip.setapi('QVariant', 2) - from PyQt4 import QtGui, QtCore - from PyQt4.QtGui import ( - QApplication, QMainWindow, QFormLayout, - QGridLayout, QHBoxLayout, QVBoxLayout, - QAbstractItemView, QHeaderView, QListWidget, - QListWidgetItem, QTabWidget, QTableWidget, - QTableWidgetItem, QFrame, QScrollArea, - QStackedWidget, QWidget, QCheckBox, - QComboBox, QDoubleSpinBox, QGroupBox, - QLineEdit, QPushButton, QRadioButton, - QSpinBox, QStyleOptionButton, QToolButton, - QProgressBar, QDialog, QColorDialog, - QDialogButtonBox, QFileDialog, QInputDialog, - QMessageBox, QAction, QActionGroup, - QLabel, QMenu, QStyle, - QSystemTrayIcon, QIcon, QPalette, QColor, - QValidator, QFont, QFontInfo, QImage, QPixmap - ) - from PyQt4.QtGui import QStyleOptionProgressBarV2 as QStyleOptionProgressBar - pyqt_version = 4 - except ImportError: - print("Couldn't import Qt dependencies. " - 'Make sure you installed the PyQt4 package.') - sys.exit(-1) class FF5Reader(QMainWindow):