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. STEPS TO REPRODUCE 1. Create new python file, for ex. test.py 2. Type "class" in file and save it 3. 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 (but it started a while ago) KDE Frameworks Version: 5.82.0 Qt Version: 5.15.2
This is a bug in how shared-mime-info detects Python files. Please report upstream at https://gitlab.freedesktop.org/xdg/shared-mime-info/-/issues
Done. https://gitlab.freedesktop.org/xdg/shared-mime-info/-/issues/164