I have a folder with Python source code. All files are being opened with double click with Text Editor, also the "problematic" one. All files have .py extension.
The "problematic" file has a green Qt icon and I didn't find a way to remove it. Reset and set default application (that now is Text Editor) didn't help.
Ubuntu 20.04
![enter image description here](https://i.stack.imgur.com/NWpAl.png)
$ file -i MyHTMLParser.py
MyHTMLParser.py: text/x-python; charset=us-ascii
$ file MyHTMLParser.py
MyHTMLParser.py: Python script, ASCII text executable
$ file -i Scanner.py
Scanner.py: text/x-python; charset=utf-8
$ file Scanner.py
Scanner.py: Python script, UTF-8 Unicode text executable, with CRLF line terminators
First line of MyHTMLParser.py:
from html.parser import HTMLParser
First line of Scanner.py:
from PyQt5 import QtCore
text/x-qml MIME type is shown from Properties
![enter image description here](https://i.stack.imgur.com/F44mG.png)
That type is not present in
/etc/mime.types
I really can't understand where that information is stored.
UPDATED 'N'
I wrote a script that remove all \r\n line endings and UTF-8 characters. Now Scanner_new.py has the same type of MyHTMLParser.py, but nothing is changed:
$ file -i MyHTMLParser.py
MyHTMLParser.py: text/x-python; charset=us-ascii
$ file MyHTMLParser.py
MyHTMLParser.py: Python script, ASCII text executable
$ file -i Scanner_new.py
Scanner_new.py: text/x-python; charset=us-ascii
$ file Scanner_new.py
Scanner_new.py: Python script, ASCII text executable
![enter image description here](https://i.stack.imgur.com/HIKZh.png)