Mercurial > louis > mq > lightsd
view monolight_type_fixes.patch @ 540:e533e28d6da5
1.2.1 patches
author | Louis Opter <louis@opter.org> |
---|---|
date | Sun, 12 Feb 2017 11:11:37 -0800 |
parents | |
children |
line wrap: on
line source
# HG changeset patch # Parent b875fdbd441682f6c6c4119d921d314c6f7e9107 monolight: trivial typing fixes Spotted those things while showing mypy to Joa at Fosdem. It definitely needs more work... diff --git a/apps/monolight/monolight/grids.py b/apps/monolight/monolight/grids.py --- a/apps/monolight/monolight/grids.py +++ b/apps/monolight/monolight/grids.py @@ -85,13 +85,13 @@ def shift(self, offset: Position) -> "LedCanvas": class _Proxy: - def __init__(_self, canvas: LedCanvas, shift: Position): + def __init__(_self, canvas: LedCanvas, shift: Position) -> None: _self._canvas = canvas _self._shift = shift def set(_self, offset: Position, level: LedLevel) -> None: offset += _self._shift - return _self._canvas.set(offset, level) + _self._canvas.set(offset, level) def shift(_self, offset: Position) -> LedCanvas: return cast(LedCanvas, _Proxy(_self, offset)) diff --git a/apps/monolight/monolight/ui/actions.py b/apps/monolight/monolight/ui/actions.py --- a/apps/monolight/monolight/ui/actions.py +++ b/apps/monolight/monolight/ui/actions.py @@ -24,7 +24,7 @@ from .. import bulbs if TYPE_CHECKING: - from ..elements import UIComponent # noqa + from .elements import UIComponent # noqa logger = logging.getLogger("monolight.ui.actions")