Bug 439108

Summary: Python files with "class" word in the beginning are classified as "text/x-modelica" (Modelica model)
Product: [Applications] dolphin Reporter: Norbert <norbertzpilicy>
Component: generalAssignee: Dolphin Bug Assignee <dolphin-bugs-null>
Status: RESOLVED UPSTREAM    
Severity: normal CC: bharadwaj.raju777, kfm-devel, nate
Priority: NOR    
Version: 21.04.1   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:

Description Norbert 2021-06-24 09:58:50 UTC
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
Comment 1 Nate Graham 2021-06-24 12:34:42 UTC
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