Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable unnecessary-lambda Pylint check #1315

Merged
merged 2 commits into from
Feb 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .pylint/pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ disable=no-self-argument,
fixme,
raise-missing-from,
logging-fstring-interpolation, # not sure why pylint doesn't like f-strings
unnecessary-lambda,
attribute-defined-outside-init,
arguments-differ,
abstract-method,
Expand Down
3 changes: 3 additions & 0 deletions idaes/core/util/tables.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading