From 0c9bd40659fd8b675e3cb2ab8bef124d5cf9ec83 Mon Sep 17 00:00:00 2001 From: Richie Cahill Date: Fri, 7 Nov 2025 06:14:52 -0500 Subject: [PATCH] fixed mypy and ruff errors --- python/database.py | 2 ++ python/random/voltage_drop.py | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/python/database.py b/python/database.py index e510715..466f4ae 100644 --- a/python/database.py +++ b/python/database.py @@ -1,3 +1,5 @@ +"""database.""" + from __future__ import annotations import logging diff --git a/python/random/voltage_drop.py b/python/random/voltage_drop.py index 7e7ef42..a38feb2 100644 --- a/python/random/voltage_drop.py +++ b/python/random/voltage_drop.py @@ -85,7 +85,7 @@ def get_material_resistivity( ) -> float: """Get the resistivity of a material.""" if not temperature: - Temperature(20.0) + temperature = Temperature(20.0) material_info = { MaterialType.COPPER: (1.724e-8, 0.00393), MaterialType.ALUMINUM: (2.908e-8, 0.00403), @@ -180,7 +180,7 @@ def max_wire_length( float: Maximum wire length in meters that maintains the specified voltage drop """ if not temperature: - Temperature(100.0, unit=TemperatureUnit.FAHRENHEIT) + temperature = Temperature(100.0, unit=TemperatureUnit.FAHRENHEIT) resistivity = get_material_resistivity(material, temperature) resistance_per_meter = resistivity / calculate_wire_area_m2(gauge)