From 694630ca02fac6cffd6ab64d4976288b9963dd0e 2020-04-27 20:53:22 From: Brett Smith Date: 2020-04-27 20:53:22 Subject: [PATCH] setup: Don't disallow untyped calls. Unfortunately this is becoming more trouble than it's worth as we call more and more untyped Beancount functions. disallow_untyped_defs provides most of the value of what we really want here, so go ahead and turn this off. --- diff --git a/conservancy_beancount/books.py b/conservancy_beancount/books.py index 072fbb65bf99c253e9cab1fcc3391f05481ac41d..6f5b6b33130464039f34e1391ef4e245ba24d128 100644 --- a/conservancy_beancount/books.py +++ b/conservancy_beancount/books.py @@ -165,6 +165,6 @@ class Loader: self.fy_range_string(from_fy, to_fy, plugins) and load the result with beancount.loader.load_string. """ - return bc_loader.load_string( # type:ignore[no-untyped-call, no-any-return] + return bc_loader.load_string( # type:ignore[no-any-return] self.fy_range_string(from_fy, to_fy, plugins), ) diff --git a/conservancy_beancount/data.py b/conservancy_beancount/data.py index c2ad43721c1302cfcf0947f56f2a7f552b45c134..4d341ca277fd1de1c9078f081d9e8a4b2e6f76c8 100644 --- a/conservancy_beancount/data.py +++ b/conservancy_beancount/data.py @@ -328,7 +328,7 @@ def balance_of(txn: Transaction, currency = '' else: weights: Sequence[Amount] = [ - bc_convert.get_weight(post) for post in match_posts # type:ignore[no-untyped-call] + bc_convert.get_weight(post) for post in match_posts ] number = sum((wt.number for wt in weights), number) currency = weights[0].currency diff --git a/setup.cfg b/setup.cfg index 5b5b19de1b4b4adc386d66a58d556bf420f7ae64..1a72506bb7662a4b7e008888bad7c0c01e3350f5 100644 --- a/setup.cfg +++ b/setup.cfg @@ -4,7 +4,7 @@ typecheck=pytest --addopts="--mypy conservancy_beancount" [mypy] disallow_any_unimported = True -disallow_untyped_calls = True +disallow_untyped_calls = False disallow_untyped_defs = True show_error_codes = True strict_equality = True