From 48494ee5e438527ae83ab996f126329cf1b6df5b Mon Sep 17 00:00:00 2001 From: Lance Edgar Date: Mon, 1 Sep 2025 10:39:30 -0500 Subject: [PATCH] fix: fix 'simplifiable-if-expression' for pylint --- .pylintrc | 1 - src/wuttaweb/forms/base.py | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/.pylintrc b/.pylintrc index 4ae2600..f457ac5 100644 --- a/.pylintrc +++ b/.pylintrc @@ -11,7 +11,6 @@ disable=fixme, missing-function-docstring, missing-module-docstring, no-member, - simplifiable-if-expression, singleton-comparison, super-init-not-called, too-many-locals, diff --git a/src/wuttaweb/forms/base.py b/src/wuttaweb/forms/base.py index 95ffc06..e0d1282 100644 --- a/src/wuttaweb/forms/base.py +++ b/src/wuttaweb/forms/base.py @@ -1125,7 +1125,7 @@ class Form: # pylint: disable=too-many-instance-attributes,too-many-public-meth # for now we explicitly translate here, ugh. also # note this does not yet allow for null values.. :( if isinstance(field.typ, colander.Boolean): - value = True if value == field.typ.true_val else False + value = value == field.typ.true_val model_data[field.oid] = make_json_safe(value)