Fixed a whole bunch of MyPy errors
New release of mypy picks up more.
This commit is contained in:
@@ -138,6 +138,8 @@ def _expand_group(block: blendfile.BlendFileBlock):
|
||||
else:
|
||||
for child in iterators.listbase(children):
|
||||
subcoll = child.get_pointer(b'collection')
|
||||
if subcoll is None:
|
||||
continue
|
||||
log.debug('recursing into child collection %s', subcoll.id_name)
|
||||
yield from _expand_group(subcoll)
|
||||
|
||||
|
||||
@@ -87,7 +87,9 @@ def _get_texture(prop_name: bytes, dblock: blendfile.BlendFileBlock, block_name:
|
||||
yield from _get_image(b'ima', tx, block_name)
|
||||
|
||||
|
||||
def _get_image(prop_name: bytes, dblock: blendfile.BlendFileBlock, block_name: bytes) \
|
||||
def _get_image(prop_name: bytes,
|
||||
dblock: typing.Optional[blendfile.BlendFileBlock],
|
||||
block_name: bytes) \
|
||||
-> typing.Iterator[result.BlockUsage]:
|
||||
"""Yield block usages from an image propery.
|
||||
|
||||
|
||||
@@ -90,7 +90,7 @@ class BlockUsage:
|
||||
self.path_base_field = path_base_field
|
||||
|
||||
# cached by __fspath__()
|
||||
self._abspath = None # type: pathlib.Path
|
||||
self._abspath = None # type: typing.Optional[pathlib.Path]
|
||||
|
||||
@staticmethod
|
||||
def guess_block_name(block: blendfile.BlendFileBlock) -> bytes:
|
||||
|
||||
Reference in New Issue
Block a user