Changeset - 694630ca02fa
[Not reviewed]
0 3 0
Brett Smith - 4 years ago 2020-04-27 20:53:22
brettcsmith@brettcsmith.org
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.
3 files changed with 3 insertions and 3 deletions:
0 comments (0 inline, 0 general)
conservancy_beancount/books.py
Show inline comments
...
 
@@ -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),
 
        )
conservancy_beancount/data.py
Show inline comments
...
 
@@ -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
setup.cfg
Show inline comments
...
 
@@ -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
0 comments (0 inline, 0 general)