MohdKhan currently I'm using ^text\/* in mime type and 'py' in extension allowed. it works fine for me.
luceos ^(application|text)\/x-python(-code)?$ reference: https://stackoverflow.com/questions/45614485/what-is-the-mime-type-for-py-files