File .deepsource.toml
not found in the default branch of the repository root. Please refer to the docs.
if
expression used can be simplified PYL-R17191319 instance.switch_subscription_bp(new_bp)
1320 elif validated_data.get("status") or new_bp:
1321 replace_type = validated_data.get("replace_immediately_type")
1322 prorate = True if new_bp else False1323 bill_usage = (
1324 replace_type
1325 == REPLACE_IMMEDIATELY_TYPE.END_CURRENT_SUBSCRIPTION_AND_BILL
The if
expression used here can be simplified to increase the code readability.
Example:
value = True if arg else False
This can be simplified into:
value = bool(arg)