diff --git a/electronics/electric_power.py b/electronics/electric_power.py index 768c3d5c7232..8f0293bd2d10 100644 --- a/electronics/electric_power.py +++ b/electronics/electric_power.py @@ -1,8 +1,9 @@ # https://en.m.wikipedia.org/wiki/Electric_power from collections import namedtuple +from typing import Tuple -def electric_power(voltage: float, current: float, power: float) -> float: +def electric_power(voltage: float, current: float, power: float) -> Tuple: """ This function can calculate any one of the three (voltage, current, power), fundamental value of electrical system. diff --git a/electronics/ohms_law.py b/electronics/ohms_law.py index a7b37b635397..c53619a10935 100644 --- a/electronics/ohms_law.py +++ b/electronics/ohms_law.py @@ -1,7 +1,8 @@ # https://en.wikipedia.org/wiki/Ohm%27s_law +from typing import Dict -def ohms_law(voltage: float, current: float, resistance: float) -> float: +def ohms_law(voltage: float, current: float, resistance: float) -> Dict[str, float]: """ Apply Ohm's Law, on any two given electrical values, which can be voltage, current, and resistance, and then in a Python dict return name/value pair of the zero value. diff --git a/web_programming/covid_stats_via_xpath.py b/web_programming/covid_stats_via_xpath.py index d22ed017878c..85ea5d940d85 100644 --- a/web_programming/covid_stats_via_xpath.py +++ b/web_programming/covid_stats_via_xpath.py @@ -7,7 +7,7 @@ from collections import namedtuple import requests -from lxml import html +from lxml import html # type: ignore covid_data = namedtuple("covid_data", "cases deaths recovered")