Python files with "class" word in the beginning are classified as "text/x-modelica" (Modelica model)
SUMMARY When the first line of Python file contains "class" keyword it's being recognized as Modelica model file not a Python file. When I leave 1st line empty and second line has class keyword it's normal. Only this config file x-modelica.xml is present in the system (no user-specific one). Also:
$ file test.py
test.py: Python script, ASCII text executable
STEPS TO REPRODUCE
- Create new python file, for ex. test.py
- Type "class" in file and save it
- The file changes icon and is recognized as text/x-modelica (Modelica model)
OBSERVED RESULT
- Python file shown as Modelica model.
EXPECTED RESULT
- Python file shown as Python file no matter the content.
SOFTWARE/OS VERSIONS
- Linux: Arch Linux
- KDE Plasma Version: 5.22.0
- KDE Frameworks Version: 5.82.0
- Qt Version: 5.15.2