it's not a shared-mime-info issue, on a GNOME session the result is right
$ xdg-mime query filetype index.py text/x-python
it's not a shared-mime-info issue, on a GNOME session the result is right
$ xdg-mime query filetype index.py
text/x-python