Changeset - 22d5b7e90a1e
[Not reviewed]
0 2 0
Brett Smith - 4 years ago 2020-03-30 03:22:35
brettcsmith@brettcsmith.org
setup: Disallow untyped calls.
2 files changed with 7 insertions and 2 deletions:
0 comments (0 inline, 0 general)
conservancy_beancount/plugin/__init__.py
Show inline comments
...
 
@@ -25,4 +25,5 @@ from typing import (
 
    Iterable,
 
    List,
 
    Optional,
 
    Set,
 
    Tuple,
...
 
@@ -58,6 +59,9 @@ class HookRegistry:
 
        return hook_cls  # to allow use as a decorator
 

	
 
    # This method is too dynamic to typecheck.
 
    def import_hooks(self, mod_name, *hook_names, package=__module__):  # type:ignore
 
    def import_hooks(self,
 
                     mod_name: str,
 
                     *hook_names: str,
 
                     package: Optional[str]=__module__,  # type:ignore[name-defined]
 
    ) -> None:
 
        module = importlib.import_module(mod_name, package)
 
        for hook_name in hook_names:
setup.cfg
Show inline comments
...
 
@@ -5,4 +5,5 @@ typecheck=pytest --addopts="--mypy conservancy_beancount"
 
[mypy]
 
disallow_any_unimported = True
 
disallow_untyped_calls = True
 
disallow_untyped_defs = True
 
show_error_codes = True
0 comments (0 inline, 0 general)