From df7d4b2e8e19dd201d764ea77f363ca0fc24200b Mon Sep 17 00:00:00 2001 From: Erwin Junge Date: Wed, 20 Oct 2021 22:57:46 +0200 Subject: [PATCH 1/2] Add missing type annotation --- boolean_algebra/quine_mc_cluskey.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/boolean_algebra/quine_mc_cluskey.py b/boolean_algebra/quine_mc_cluskey.py index 9cc99b1eeabb..ce51e7bdd42d 100644 --- a/boolean_algebra/quine_mc_cluskey.py +++ b/boolean_algebra/quine_mc_cluskey.py @@ -146,7 +146,7 @@ def prime_implicant_chart( return chart -def main(): +def main() -> None: no_of_variable = int(input("Enter the no. of variables\n")) minterms = [ int(x) From b96190288599811967e07dc055c656a11c7101eb Mon Sep 17 00:00:00 2001 From: Erwin Junge Date: Wed, 20 Oct 2021 22:57:55 +0200 Subject: [PATCH 2/2] Fix conversion bug This failed when called with the documented example of `1.5` and was correctly pointed out by `mypy --strict` --- boolean_algebra/quine_mc_cluskey.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/boolean_algebra/quine_mc_cluskey.py b/boolean_algebra/quine_mc_cluskey.py index ce51e7bdd42d..0342e5c67753 100644 --- a/boolean_algebra/quine_mc_cluskey.py +++ b/boolean_algebra/quine_mc_cluskey.py @@ -149,7 +149,7 @@ def prime_implicant_chart( def main() -> None: no_of_variable = int(input("Enter the no. of variables\n")) minterms = [ - int(x) + float(x) for x in input( "Enter the decimal representation of Minterms 'Spaces Separated'\n" ).split()