Fix issue with mypy : moved setter next to property

This commit is contained in:
Edgar P. Burkhart 2024-12-08 10:46:43 +01:00
parent a55e7c7bfe
commit 477cc99247
Signed by: edpibu
GPG key ID: 9833D3C5A25BD227

View file

@ -9,7 +9,7 @@ logger = logging.getLogger(__name__)
COLORS = { COLORS = {
"Bleu": [0, 0, 255], "Bleu": [0, 0, 255],
"Blanc": [0, 0, 0], "Blanc": [255, 255, 255],
"Rouge": [255, 0, 0], "Rouge": [255, 0, 0],
"Verte": [0, 127, 31], "Verte": [0, 127, 31],
"Jaune": [255, 255, 0], "Jaune": [255, 255, 0],
@ -108,10 +108,6 @@ class Screen:
def secondary(self): def secondary(self):
return self._secondary return self._secondary
@property
def secondary_pixels(self):
return self._secondary_pixels
@secondary.setter @secondary.setter
def secondary(self, value): def secondary(self, value):
self._secondary = value self._secondary = value
@ -124,6 +120,10 @@ class Screen:
if not self._tmp: if not self._tmp:
self.set_pixels() self.set_pixels()
@property
def secondary_pixels(self):
return self._secondary_pixels
def stick_click(self, event): def stick_click(self, event):
match (event.action, self._held): match (event.action, self._held):
case ("held", False): case ("held", False):