MCPcopy
hub / github.com/PokeAPI/pokeapi / file_path_or_none

Function file_path_or_none

data/v2/build.py:63–72  ·  view source on GitHub ↗
(file_name, image_file=True)

Source from the content-addressed store, hash-verified

61
62
63def file_path_or_none(file_name, image_file=True):
64 if not image_file:
65 return (
66 SOUND_DIR.format(file_name=file_name)
67 if file_name in RESOURCE_CRIES
68 else None
69 )
70 return (
71 MEDIA_DIR.format(file_name=file_name) if file_name in RESOURCE_IMAGES else None
72 )
73
74
75def with_iter(context, iterable=None):

Callers 3

csv_record_to_objectsFunction · 0.85
try_image_namesFunction · 0.85
try_cry_namesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected