1
0
mirror of https://github.com/DarklightGames/io_scene_psk_psa.git synced 2024-11-15 02:37:39 +01:00

Fixing warnings and typing

This commit is contained in:
Colin Basnett 2022-11-12 16:26:40 -08:00
parent aa8725c3d0
commit 86473584b8
2 changed files with 3 additions and 3 deletions

View File

@ -47,7 +47,7 @@ def get_nla_strips_in_timeframe(animation_data, frame_min, frame_max) -> List[Nl
return strips
def populate_bone_group_list(armature_object: Object, bone_group_list: bpy.types.Collection) -> None:
def populate_bone_group_list(armature_object: Object, bone_group_list: bpy.props.CollectionProperty) -> None:
"""
Updates the bone group collection.
@ -94,7 +94,7 @@ def get_psa_sequence_name(action, should_use_original_sequence_name):
def check_bone_names(bone_names: Iterable[str]):
pattern = re.compile(r'^[a-zA-Z0-9_\- ]+$')
pattern = re.compile(r'^[a-zA-Z\d_\- ]+$')
invalid_bone_names = [x for x in bone_names if pattern.match(x) is None]
if len(invalid_bone_names) > 0:
raise RuntimeError(f'The following bone names are invalid: {invalid_bone_names}.\n'

View File

@ -12,7 +12,7 @@ def _read_types(fp, data_class, section: Section, data):
offset += section.data_size
def read_psk(path) -> Psk:
def read_psk(path: str) -> Psk:
psk = Psk()
with open(path, 'rb') as fp:
while fp.read(1):