From ec710b2ce1d92ca6f2bd8053395fd8e8a4bafdba Mon Sep 17 00:00:00 2001 From: "sourcery-ai[bot]" <58596630+sourcery-ai[bot]@users.noreply.github.com> Date: Sun, 20 Feb 2022 01:36:19 -0500 Subject: [PATCH] 'Refactored by Sourcery' (#983) Co-authored-by: Sourcery AI <> --- .../analyses/milhdbk217f/models/inductor.py | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/src/ramstk/analyses/milhdbk217f/models/inductor.py b/src/ramstk/analyses/milhdbk217f/models/inductor.py index bdf1fc13a..c175039ae 100644 --- a/src/ramstk/analyses/milhdbk217f/models/inductor.py +++ b/src/ramstk/analyses/milhdbk217f/models/inductor.py @@ -277,9 +277,7 @@ def calculate_part_stress_lambda_b( _ref_temp = REF_TEMPS[subcategory_id][insulation_id] _f0 = _dic_factors[subcategory_id][insulation_id][0] _f1 = _dic_factors[subcategory_id][insulation_id][1] - _lambda_b = _f0 * exp(((temperature_hot_spot + 273.0) / _ref_temp) ** _f1) - - return _lambda_b + return _f0 * exp(((temperature_hot_spot + 273.0) / _ref_temp) ** _f1) def calculate_temperature_rise_input_power_weight( @@ -383,12 +381,11 @@ def get_part_stress_quality_factor( :raise: IndexError if passed an unknown quality ID. :raise: KeyError if passed an unknown subcategory ID or family ID. """ - if subcategory_id == 1: - _pi_q = PART_STRESS_PI_Q[subcategory_id][family_id][quality_id - 1] - else: - _pi_q = PART_STRESS_PI_Q[subcategory_id][quality_id - 1] - - return _pi_q + return ( + PART_STRESS_PI_Q[subcategory_id][family_id][quality_id - 1] + if subcategory_id == 1 + else PART_STRESS_PI_Q[subcategory_id][quality_id - 1] + ) def get_temperature_rise_spec_sheet(page_number: int) -> float: