mirror of
https://github.com/RichieCahill/dotfiles.git
synced 2026-04-17 04:58:19 -04:00
fixed mypy and ruff errors
This commit is contained in:
@@ -1,3 +1,5 @@
|
|||||||
|
"""database."""
|
||||||
|
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
|
|||||||
@@ -85,7 +85,7 @@ def get_material_resistivity(
|
|||||||
) -> float:
|
) -> float:
|
||||||
"""Get the resistivity of a material."""
|
"""Get the resistivity of a material."""
|
||||||
if not temperature:
|
if not temperature:
|
||||||
Temperature(20.0)
|
temperature = Temperature(20.0)
|
||||||
material_info = {
|
material_info = {
|
||||||
MaterialType.COPPER: (1.724e-8, 0.00393),
|
MaterialType.COPPER: (1.724e-8, 0.00393),
|
||||||
MaterialType.ALUMINUM: (2.908e-8, 0.00403),
|
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
|
float: Maximum wire length in meters that maintains the specified voltage drop
|
||||||
"""
|
"""
|
||||||
if not temperature:
|
if not temperature:
|
||||||
Temperature(100.0, unit=TemperatureUnit.FAHRENHEIT)
|
temperature = Temperature(100.0, unit=TemperatureUnit.FAHRENHEIT)
|
||||||
|
|
||||||
resistivity = get_material_resistivity(material, temperature)
|
resistivity = get_material_resistivity(material, temperature)
|
||||||
resistance_per_meter = resistivity / calculate_wire_area_m2(gauge)
|
resistance_per_meter = resistivity / calculate_wire_area_m2(gauge)
|
||||||
|
|||||||
Reference in New Issue
Block a user