diff options
author | Alex Henrie <alexhenrie24@gmail.com> | 2024-04-24 21:28:44 -0600 |
---|---|---|
committer | Alex Henrie <alexhenrie24@gmail.com> | 2024-04-24 21:28:44 -0600 |
commit | 5b8e53fd59dd5a5b9445b455402dd94cd64dc962 (patch) | |
tree | 0b2671f2c870991f9ab8a3b5e3ba9e966d4f791f /data | |
parent | 2c4538f0ff0a03e1d9cf24a4c016332cff3e16d8 (diff) |
Separate text/x-cython from text/x-python
Cython is a superset of Python that requires compilation; it cannot be
directly executed by the Python interpreter.
Cython files are identified by a .pyx, .pxd, or .pxi extension. I have
not seen anyone using .py2x or .py3x to indicate which Python version
the Cython module is compatible with.
https://github.com/github-linguist/linguist/blob/7ca3799b8b5f1acde1dd7a8dfb7ae849d3dfb4cd/lib/linguist/languages.yml#L1398
https://cython.readthedocs.io/en/latest/src/userguide/language_basics.html#cython-file-types
Diffstat (limited to 'data')
-rw-r--r-- | data/freedesktop.org.xml.in | 11 |
1 files changed, 8 insertions, 3 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"/> |