Variable types

main
bashrc 2026-05-05 14:02:57 +01:00
parent c66ebe888a
commit 2c1f80476f
1 changed files with 5 additions and 5 deletions

View File

@ -1365,12 +1365,12 @@ def get_gender_from_bio(base_dir: str, actor: str, person_cache: {},
actor = get_actor_from_post_id(actor) actor = get_actor_from_post_id(actor)
if not person_cache.get(actor): if not person_cache.get(actor):
return default_gender return default_gender
bio_found = None bio_found: str = None
if translate: if translate:
pronoun_str = translate['pronoun'].lower() pronoun_str: str = translate['pronoun'].lower()
else: else:
pronoun_str = 'pronoun' pronoun_str: str = 'pronoun'
actor_json = None actor_json: dict = None
if person_cache[actor].get('actor'): if person_cache[actor].get('actor'):
actor_json = person_cache[actor]['actor'] actor_json = person_cache[actor]['actor']
else: else:
@ -1389,7 +1389,7 @@ def get_gender_from_bio(base_dir: str, actor: str, person_cache: {},
for tag in tags_list: for tag in tags_list:
if not isinstance(tag, dict): if not isinstance(tag, dict):
continue continue
name_value = None name_value: str = None
if tag.get('name'): if tag.get('name'):
if isinstance(tag['name'], str): if isinstance(tag['name'], str):
name_value = tag['name'] name_value = tag['name']