From 8f35546d84d2d05fa6b514558796bf7c82fb11ed Mon Sep 17 00:00:00 2001 From: Raffson Date: Sun, 9 Jul 2023 22:59:23 +0200 Subject: [PATCH] Fine-tuning some typing issues --- qt_ui/windows/newgame/WizardPages/QFactionSelection.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/qt_ui/windows/newgame/WizardPages/QFactionSelection.py b/qt_ui/windows/newgame/WizardPages/QFactionSelection.py index 7f851b0b..2122e342 100644 --- a/qt_ui/windows/newgame/WizardPages/QFactionSelection.py +++ b/qt_ui/windows/newgame/WizardPages/QFactionSelection.py @@ -1,6 +1,7 @@ from __future__ import unicode_literals from copy import deepcopy +from typing import Union from PySide2 import QtWidgets, QtGui from PySide2.QtCore import Qt @@ -28,7 +29,7 @@ class QFactionUnits(QScrollArea): self.faction = faction self._create_checkboxes() - def _add_checkboxes(self, units: list, counter: int, grid: QGridLayout) -> int: + def _add_checkboxes(self, units: set, counter: int, grid: QGridLayout) -> int: counter += 1 for i, v in enumerate(sorted(units, key=lambda x: x.name), counter): cb = QCheckBox(v.name) @@ -90,7 +91,7 @@ class QFactionUnits(QScrollArea): if self.parent: self.parent.update() - def updateFactionUnits(self, units: list): + def updateFactionUnits(self, units: Union[set, list]): deletes = [] for a in units: if not self.checkboxes[a.name].isChecked():