def METHOD_NAME(self, dir):
    if dir != '':
        self.files = [
            FileInfo(file_name=join(dir, name))
            for name in listdir(dir)
            if ((splitext(name)[1] == '.py') and isfile(join(dir, name)))
        ]
    else:
        self.files = []