From 6b07527b232ece8bd5a98c0e4b0ecd7011647cd0 Mon Sep 17 00:00:00 2001 From: Andreas Motl Date: Tue, 22 Nov 2022 19:47:23 +0100 Subject: [PATCH] CodeQL: Mitigate reports about `py/unnecessary-lambda` --- crate/crash/config.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/crate/crash/config.py b/crate/crash/config.py index af2f2aea..e7a4e8e9 100644 --- a/crate/crash/config.py +++ b/crate/crash/config.py @@ -56,11 +56,11 @@ def bwc_bool_transform_from(cls, x): def __init__(self, path): self.type_mapping = { str: partial(self._get_or_set, - transform_from=lambda x: str(x), - transform_to=lambda x: str(x)), + transform_from=str, + transform_to=str), int: partial(self._get_or_set, - transform_from=lambda x: int(x), - transform_to=lambda x: str(x)), + transform_from=int, + transform_to=str), bool: partial(self._get_or_set, transform_from=Configuration.bwc_bool_transform_from, transform_to=lambda x: str(int(x))),