From e43a7a279bc948428b3b72135b1c6a61d3043be4 Mon Sep 17 00:00:00 2001 From: Yaroslav Chvanov Date: Wed, 1 Mar 2023 22:37:03 +0300 Subject: [PATCH] ratbagctl: simplify an expression to make mypy understand it --- tools/ratbagctl.body.py.in | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/tools/ratbagctl.body.py.in b/tools/ratbagctl.body.py.in index aa5e64b7..d66a08a2 100755 --- a/tools/ratbagctl.body.py.in +++ b/tools/ratbagctl.body.py.in @@ -1386,10 +1386,9 @@ class RatbagParserSwitch(RatbagParser): if switch is not None else [] ) - if N_access is not None: - self.N_access = RatbagParserNAccess(**N_access) - else: - self.N_access = None + self.N_access = ( + RatbagParserNAccess(**N_access) if N_access is not None else None + ) def repr_args(self) -> str: return """switch='{}', N_access='{}', {}""".format(