lint, badges

This commit is contained in:
sezanzeb 2020-12-31 21:55:38 +01:00
parent f4da5e7bd8
commit 56b6573d42
6 changed files with 9 additions and 10 deletions

View File

@ -181,7 +181,7 @@ class Daemon:
mapping.load(path) mapping.load(path)
except FileNotFoundError as error: except FileNotFoundError as error:
logger.error(str(error)) logger.error(str(error))
return return False
if xmodmap_path is not None: if xmodmap_path is not None:
try: try:

View File

@ -27,7 +27,6 @@ import asyncio
import time import time
import subprocess import subprocess
import multiprocessing import multiprocessing
import itertools
import evdev import evdev
from evdev.ecodes import EV_KEY, EV_ABS, EV_REL from evdev.ecodes import EV_KEY, EV_ABS, EV_REL
@ -430,7 +429,7 @@ class KeycodeInjector:
Parameters Parameters
---------- ----------
macros : int -> _Macro macros : (int, int) -> _Macro
macro with a handler that writes to the provided uinput macro with a handler that writes to the provided uinput
source : evdev.InputDevice source : evdev.InputDevice
where to read keycodes from where to read keycodes from

View File

@ -256,9 +256,9 @@ class _KeycodeReader:
if len(self._unreleased) > 0: if len(self._unreleased) > 0:
return Key(*self._unreleased.values()) return Key(*self._unreleased.values())
else:
# nothing # nothing
return None return None
keycode_reader = _KeycodeReader() keycode_reader = _KeycodeReader()

View File

@ -42,7 +42,8 @@ def to_string(key):
"""A nice to show description of the pressed key.""" """A nice to show description of the pressed key."""
if isinstance(key, Key): if isinstance(key, Key):
return ' + '.join([to_string(sub_key) for sub_key in key]) return ' + '.join([to_string(sub_key) for sub_key in key])
elif isinstance(key[0], tuple):
if isinstance(key[0], tuple):
raise Exception('deprecated stuff') raise Exception('deprecated stuff')
ev_type, code, value = key ev_type, code, value = key

View File

@ -24,7 +24,6 @@
import os import os
import json import json
import itertools
import copy import copy
from keymapper.logger import logger from keymapper.logger import logger

View File

@ -17,7 +17,7 @@
<text x="22.0" y="14">pylint</text> <text x="22.0" y="14">pylint</text>
</g> </g>
<g fill="#fff" text-anchor="middle" font-family="DejaVu Sans,Verdana,Geneva,sans-serif" font-size="11"> <g fill="#fff" text-anchor="middle" font-family="DejaVu Sans,Verdana,Geneva,sans-serif" font-size="11">
<text x="63.0" y="15" fill="#010101" fill-opacity=".3">9.76</text> <text x="63.0" y="15" fill="#010101" fill-opacity=".3">9.71</text>
<text x="62.0" y="14">9.76</text> <text x="62.0" y="14">9.71</text>
</g> </g>
</svg> </svg>

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 1.0 KiB