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.
This commit is contained in:
		
							parent
							
								
									1383dabf3b
								
							
						
					
					
						commit
						694630ca02
					
				
					 3 changed files with 3 additions and 3 deletions
				
			
		| 
						 | 
					@ -165,6 +165,6 @@ class Loader:
 | 
				
			||||||
        self.fy_range_string(from_fy, to_fy, plugins)
 | 
					        self.fy_range_string(from_fy, to_fy, plugins)
 | 
				
			||||||
        and load the result with beancount.loader.load_string.
 | 
					        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),
 | 
					            self.fy_range_string(from_fy, to_fy, plugins),
 | 
				
			||||||
        )
 | 
					        )
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -328,7 +328,7 @@ def balance_of(txn: Transaction,
 | 
				
			||||||
        currency = ''
 | 
					        currency = ''
 | 
				
			||||||
    else:
 | 
					    else:
 | 
				
			||||||
        weights: Sequence[Amount] = [
 | 
					        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)
 | 
					        number = sum((wt.number for wt in weights), number)
 | 
				
			||||||
        currency = weights[0].currency
 | 
					        currency = weights[0].currency
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -4,7 +4,7 @@ typecheck=pytest --addopts="--mypy conservancy_beancount"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
[mypy]
 | 
					[mypy]
 | 
				
			||||||
disallow_any_unimported = True
 | 
					disallow_any_unimported = True
 | 
				
			||||||
disallow_untyped_calls = True
 | 
					disallow_untyped_calls = False
 | 
				
			||||||
disallow_untyped_defs = True
 | 
					disallow_untyped_defs = True
 | 
				
			||||||
show_error_codes = True
 | 
					show_error_codes = True
 | 
				
			||||||
strict_equality = True
 | 
					strict_equality = True
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		
		Reference in a new issue