Skip to content

Commit

Permalink
'Refactored by Sourcery' (#983)
Browse files Browse the repository at this point in the history
Co-authored-by: Sourcery AI <>
  • Loading branch information
sourcery-ai[bot] authored Feb 20, 2022
1 parent 33d7fa0 commit ec710b2
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions src/ramstk/analyses/milhdbk217f/models/inductor.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit ec710b2

Please sign in to comment.