summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--data/freedesktop.org.xml.in11
-rw-r--r--tests/mime-detection/list2
2 files changed, 9 insertions, 4 deletions
diff --git a/data/freedesktop.org.xml.in b/data/freedesktop.org.xml.in
index 810a566..7c542c6 100644
--- a/data/freedesktop.org.xml.in
+++ b/data/freedesktop.org.xml.in
@@ -7346,13 +7346,12 @@ command to generate the output files.
</magic>
<glob pattern="*.py"/><!-- lower priority than in text/x-python -->
<glob pattern="*.py3" weight="60"/>
- <glob pattern="*.py3x" weight="60"/>
<glob pattern="*.pyi" weight="60"/>
</mime-type>
<mime-type type="text/x-python">
<comment>Python script</comment>
<sub-class-of type='application/x-executable'/>
- <sub-class-of type="text/plain"/>
+ <sub-class-of type="text/x-cython"/>
<magic>
<match type="string" value="#!/bin/python" offset="0"/>
<match type="string" value="#! /bin/python" offset="0"/>
@@ -7366,9 +7365,15 @@ command to generate the output files.
<match type="string" value='/bin/env python' offset="2:16"/>
</magic>
<glob pattern="*.py" weight="60"/>
- <glob pattern="*.pyx" weight="60"/>
<glob pattern="*.wsgi" weight="60"/>
</mime-type>
+ <mime-type type="text/x-cython">
+ <comment>Cython source code</comment>
+ <sub-class-of type="text/plain"/>
+ <glob pattern="*.pxd"/>
+ <glob pattern="*.pxi"/>
+ <glob pattern="*.pyx"/>
+ </mime-type>
<mime-type type="text/x-sagemath">
<comment>SageMath script</comment>
<sub-class-of type="text/x-python"/>
diff --git a/tests/mime-detection/list b/tests/mime-detection/list
index 3a78a8b..698d96f 100644
--- a/tests/mime-detection/list
+++ b/tests/mime-detection/list
@@ -472,7 +472,7 @@ test.scss text/x-scss ox
test.jnlp application/x-java-jnlp-file
# Python script
test.py text/x-python
-test.pyx text/x-python ox
+test.pyx text/x-cython ox
# https://gitlab.freedesktop.org/xdg/shared-mime-info/-/issues/127
test_issue127.py text/x-python ox
# Python 3 script