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:
@@ -26,7 +26,7 @@ def sequencer_strips(sequence_editor: BlendFileBlock) \
|
||||
See blender_asset_tracer.cdefs.SEQ_TYPE_xxx for the type numbers.
|
||||
"""
|
||||
|
||||
def iter_seqbase(seqbase) -> typing.Iterator[BlendFileBlock]:
|
||||
def iter_seqbase(seqbase) -> typing.Iterator[typing.Tuple[BlendFileBlock, int]]:
|
||||
for seq in listbase(seqbase):
|
||||
seq.refine_type(b'Sequence')
|
||||
seq_type = seq[b'type']
|
||||
|
||||
Reference in New Issue
Block a user