From 916d2cbe774d07c1cca741992ac733c08bd7f956 Mon Sep 17 00:00:00 2001 From: Ludovico Bianchi Date: Thu, 15 Feb 2024 13:53:28 -0600 Subject: [PATCH] Add exclusion for unnecessary-lambda check --- idaes/core/util/tables.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/idaes/core/util/tables.py b/idaes/core/util/tables.py index 836de48ed1..6fec166af1 100644 --- a/idaes/core/util/tables.py +++ b/idaes/core/util/tables.py @@ -284,6 +284,9 @@ def stream_table_dataframe_to_string(stream_table, **kwargs): # Set some default values for keyword arguments na_rep = kwargs.pop("na_rep", "-") justify = kwargs.pop("justify", "center") + # the lambda here could be replaced by "{:#.5g}".format, + # but arguably that's not as clearly identifiable as a function/callable + # pylint: disable-next=unnecessary-lambda float_format = kwargs.pop("float_format", lambda x: "{:#.5g}".format(x)) # Print stream table