This is misleading: you actually mean the file extension, so rename this to extension and update the docstring.