ecodes = None
print('WARNING: evdev is not available')
+try:
+ from functools import lru_cache
+except ImportError:
+ # don't do caching on old python
+ lru_cache = lambda: (lambda f: f)
+
EOL = LineEnd().suppress()
EMPTYLINE = LineStart() + LineEnd()
COMMENTLINE = pythonStyleComment + EOL
'keyboard': ('name', ),
}
-@functools.lru_cache()
+@lru_cache()
def hwdb_grammar():
ParserElement.setDefaultWhitespaceChars('')
return grammar
-@functools.lru_cache()
+@lru_cache()
def property_grammar():
ParserElement.setDefaultWhitespaceChars(' ')