From ed5efab1c4d775ecb0b5b14b0e0bb2cbf42e5acb Mon Sep 17 00:00:00 2001 From: HardMax71 Date: Sun, 18 Aug 2024 23:14:30 +0200 Subject: [PATCH] - updated login dialog - ruff fixes --- desktop_app/src/ui/login_dialog.py | 7 ++++--- desktop_app/src/ui/warehouse_visualization_window.py | 6 ++---- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/desktop_app/src/ui/login_dialog.py b/desktop_app/src/ui/login_dialog.py index 350c44f..7e63ab8 100644 --- a/desktop_app/src/ui/login_dialog.py +++ b/desktop_app/src/ui/login_dialog.py @@ -1,9 +1,10 @@ from PySide6.QtCore import Qt -from PySide6.QtWidgets import (QDialog, QVBoxLayout, QHBoxLayout, QLabel, - QLineEdit, QPushButton, QFormLayout, QMessageBox) +from PySide6.QtWidgets import (QDialog, QVBoxLayout, QLineEdit, QPushButton, QFormLayout, QMessageBox) from requests import HTTPError + from desktop_app.src.services.authentication import AuthenticationService + class LoginDialog(QDialog): def __init__(self, auth_service: AuthenticationService, parent=None): super().__init__(parent) @@ -62,4 +63,4 @@ def keyPressEvent(self, event): super().keyPressEvent(event) def show_error_dialog(self, message: str): - QMessageBox.critical(self, "Login Error", message) \ No newline at end of file + QMessageBox.critical(self, "Login Error", message) diff --git a/desktop_app/src/ui/warehouse_visualization_window.py b/desktop_app/src/ui/warehouse_visualization_window.py index 0c3047a..042bbb7 100644 --- a/desktop_app/src/ui/warehouse_visualization_window.py +++ b/desktop_app/src/ui/warehouse_visualization_window.py @@ -1,13 +1,11 @@ from collections import defaultdict + import matplotlib matplotlib.use('Qt5Agg') from PySide6.QtWidgets import QMainWindow, QVBoxLayout, QWidget, QPushButton, QHBoxLayout from matplotlib.backends.backend_qt5agg import FigureCanvasQTAgg as FigureCanvas from matplotlib.figure import Figure -import matplotlib.pyplot as plt -from mpl_toolkits.mplot3d import Axes3D -import numpy as np from public_api.api import WarehouseAPI, APIClient from public_api.shared_schemas import WarehouseLayout @@ -148,4 +146,4 @@ def init_ui(self): self.setCentralWidget(central_widget) def refresh_data(self): - self.visualization_widget.load_warehouse_data() \ No newline at end of file + self.visualization_widget.load_warehouse_data()