consider-ternary-expression / W0160#

Message emitted:

Consider rewriting as a ternary expression

Description:

Multiple assign statements spread across if/else blocks can be rewritten with a single assignment and ternary expression

Correct code:

# This is a placeholder for correct code for this message.

Additional details:

You can help us make the doc better by contributing !

Note

This message is emitted by the optional 'consider_ternary_expression' checker which requires the pylint.extensions.consider_ternary_expression plugin to be loaded.

Created by the consider_ternary_expression checker.