From bc9fa9266761049370d34fa9e1899a0c68118bbc Mon Sep 17 00:00:00 2001 From: Yaroslav Chvanov Date: Wed, 1 Mar 2023 15:31:46 +0300 Subject: [PATCH] tools: prevent a syntax error for code editors and linters --- tools/ratbagctl.body.py.in | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tools/ratbagctl.body.py.in b/tools/ratbagctl.body.py.in index f20e23c0..2830174f 100755 --- a/tools/ratbagctl.body.py.in +++ b/tools/ratbagctl.body.py.in @@ -29,6 +29,9 @@ import re from ratbagd import Ratbagd, RatbagdDevice, RatbagdProfile, RatbagdMacro, RatbagdResolution, RatbagdButton, RatbagdLed, RatbagdUnavailable, RatbagError, RatbagErrorCode, RatbagErrorCapability, RatbagDeviceType # NOQA +RATBAGD_API_VERSION = int("@RATBAGD_API_VERSION@") + + def humanize(string): return string.lower().replace('_', '-') @@ -1597,7 +1600,7 @@ def on_device_added(ratbagd, device): def open_ratbagd(ratbagd_process=None, verbose=0): try: - r = Ratbagd(@RATBAGD_API_VERSION@) + r = Ratbagd(RATBAGD_API_VERSION) r.verbose = verbose try: r.connect('device-added', on_device_added)