Static type checking with mypy
This does introduce some not-so-nice things, like having to annotate each `__init__` function with `-> None`. However, the benefits of having static type checking in a complex bit of software like BAT outweigh the downsides.
This commit is contained in:
@@ -13,8 +13,8 @@ from . import result, modifier_walkers
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
_warned_about_types = set()
|
||||
_funcs_for_code = {}
|
||||
_warned_about_types = set() # type: typing.Set[bytes]
|
||||
_funcs_for_code = {} # type: typing.Dict[bytes, typing.Callable]
|
||||
|
||||
|
||||
def iter_assets(block: blendfile.BlendFileBlock) -> typing.Iterator[result.BlockUsage]:
|
||||
|
||||
Reference in New Issue
Block a user