PEP 8 cleanup
parent
6bf10818c0
commit
639a7493dc
|
@ -5,10 +5,11 @@ from PyQt5.QtWidgets import (QSizePolicy, QGraphicsWidget, QGraphicsItem,
|
||||||
from PyQt5.QtCore import (QAbstractAnimation, QObject, QPointF, Qt, QRectF, QLineF,
|
from PyQt5.QtCore import (QAbstractAnimation, QObject, QPointF, Qt, QRectF, QLineF,
|
||||||
QPropertyAnimation, pyqtProperty, pyqtSignal, QSizeF)
|
QPropertyAnimation, pyqtProperty, pyqtSignal, QSizeF)
|
||||||
|
|
||||||
from graphic_components import sudoku_graphics as sdk_grap
|
from . import sudoku_graphics as sdk_grap
|
||||||
from graphic_components import menu_graphics as menu_grap
|
from . import menu_graphics as menu_grap
|
||||||
from general import extras
|
from general import extras
|
||||||
|
|
||||||
|
|
||||||
class BoxBoard(QGraphicsWidget):
|
class BoxBoard(QGraphicsWidget):
|
||||||
|
|
||||||
# Initialisation
|
# Initialisation
|
||||||
|
@ -88,6 +89,7 @@ class GameBoard(BoxBoard):
|
||||||
self.gamegrid.freeze = False
|
self.gamegrid.freeze = False
|
||||||
self.gamegrid.setFocus()
|
self.gamegrid.setFocus()
|
||||||
|
|
||||||
|
|
||||||
class MenuBoard(BoxBoard):
|
class MenuBoard(BoxBoard):
|
||||||
# TODO: Create the components for the menu: A timer and a difficulty selector
|
# TODO: Create the components for the menu: A timer and a difficulty selector
|
||||||
def __init__(self, width, height, parent=None):
|
def __init__(self, width, height, parent=None):
|
||||||
|
|
|
@ -3,7 +3,7 @@ from PyQt5.Qt import QApplication, QTimer
|
||||||
from PyQt5.QtWidgets import (QGraphicsScene, QGraphicsView, QGraphicsItem,
|
from PyQt5.QtWidgets import (QGraphicsScene, QGraphicsView, QGraphicsItem,
|
||||||
QGraphicsLineItem, QGraphicsRectItem, QGraphicsObject,
|
QGraphicsLineItem, QGraphicsRectItem, QGraphicsObject,
|
||||||
QGraphicsItemGroup, QGraphicsPathItem)
|
QGraphicsItemGroup, QGraphicsPathItem)
|
||||||
from PyQt5.QtCore import (QAbstractAnimation, QObject, QPointF, Qt, QRectF,QLineF,
|
from PyQt5.QtCore import (QAbstractAnimation, QObject, QPointF, Qt, QRectF, QLineF,
|
||||||
QPropertyAnimation, pyqtProperty, pyqtSignal)
|
QPropertyAnimation, pyqtProperty, pyqtSignal)
|
||||||
import sys, math
|
import sys, math
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,8 @@ from PyQt5.QtWidgets import (QSizePolicy, QGraphicsWidget, QGraphicsItem,
|
||||||
from PyQt5.QtCore import (QAbstractAnimation, QObject, QPointF, Qt, QRectF, QLineF,
|
from PyQt5.QtCore import (QAbstractAnimation, QObject, QPointF, Qt, QRectF, QLineF,
|
||||||
QPropertyAnimation, pyqtProperty, pyqtSignal, QSizeF)
|
QPropertyAnimation, pyqtProperty, pyqtSignal, QSizeF)
|
||||||
|
|
||||||
from graphic_components import buttons
|
from . import buttons
|
||||||
|
|
||||||
|
|
||||||
class TimerDisplayer(QGraphicsWidget):
|
class TimerDisplayer(QGraphicsWidget):
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,8 @@ from PyQt5.QtCore import (QAbstractAnimation, QPointF, Qt, QRectF, QLineF,
|
||||||
|
|
||||||
from gameplay import sudoku_gameplay as sdk
|
from gameplay import sudoku_gameplay as sdk
|
||||||
from general.extras import bound_value
|
from general.extras import bound_value
|
||||||
from graphic_components import buttons
|
from . import buttons
|
||||||
|
|
||||||
import numpy as np
|
import numpy as np
|
||||||
|
|
||||||
|
|
||||||
|
|
5
main.py
5
main.py
|
@ -5,9 +5,9 @@ from PyQt5.QtWidgets import (QGraphicsScene, QGraphicsView, QGraphicsItem,
|
||||||
QGraphicsItemGroup, QGraphicsWidget, QGraphicsLinearLayout)
|
QGraphicsItemGroup, QGraphicsWidget, QGraphicsLinearLayout)
|
||||||
from PyQt5.QtCore import (QAbstractAnimation, QObject, QPoint, QPointF, Qt, QRectF,QLineF,
|
from PyQt5.QtCore import (QAbstractAnimation, QObject, QPoint, QPointF, Qt, QRectF,QLineF,
|
||||||
QPropertyAnimation, pyqtProperty, pyqtSignal)
|
QPropertyAnimation, pyqtProperty, pyqtSignal)
|
||||||
import sys, math
|
import sys
|
||||||
|
|
||||||
from graphic_components import buttons, board
|
from graphic_components import board
|
||||||
|
|
||||||
|
|
||||||
class SudokuWindow(QGraphicsView):
|
class SudokuWindow(QGraphicsView):
|
||||||
|
@ -51,7 +51,6 @@ class SudokuWindow(QGraphicsView):
|
||||||
self.gameboard.freeze_gameboard(freeze)
|
self.gameboard.freeze_gameboard(freeze)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
app = 0
|
app = 0
|
||||||
app = QApplication(sys.argv)
|
app = QApplication(sys.argv)
|
||||||
|
|
Loading…
Reference in New Issue