in remote_settings/client.py [0:0]
def _determine_file_type(name):
"""Returns the type of the file based on the file name.
Note that this is different than the file extension.
The resulting type will be one of the following strings:
{"model", "lex", "vocab", "trgvocab", "srcvocab", "qualityModel"}
Args:
name str: The name of a file to attach to a record
Returns:
str: The type of the file
"""
segments = name.split(".")
file_type_segment = segments[0]
return file_type_segment