Bug 439108 - Python files with "class" word in the beginning are classified as "text/x-modelica" (Modelica model)
Summary: Python files with "class" word in the beginning are classified as "text/x-mod...
Status: RESOLVED UPSTREAM
Alias: None
Product: dolphin
Classification: Applications
Component: general (show other bugs)
Version: 21.04.1
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Dolphin Bug Assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-06-24 09:58 UTC by Norbert
Modified: 2021-06-24 13:27 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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