diff options
author | Illia Volochii <illia.volochii@gmail.com> | 2021-03-09 21:59:21 +0200 |
---|---|---|
committer | David Faure <faure@kde.org> | 2021-05-27 20:11:20 +0000 |
commit | 7d5f0cf4b030dc7217565087f54b46a077cf1ac6 (patch) | |
tree | 057e09865c542e527ff6162faced79fc729109d9 | |
parent | 321b0e1dabd791235e35614c54cb32e8cf336af4 (diff) | |
download | shared-mime-info-7d5f0cf4b030dc7217565087f54b46a077cf1ac6.tar.gz |
text/x-python3: add *.pyi glob (Python stub files)
Stub files are files containing type hints, they are
written in normal Python 3 syntax, but
generally leaving out runtime logic like variable
initializers, function bodies, and default arguments.
https://www.python.org/dev/peps/pep-0484/#stub-files
https://mypy.readthedocs.io/en/stable/stubs.html#stub-file-syntax
-rw-r--r-- | data/freedesktop.org.xml.in | 1 | ||||
-rw-r--r-- | tests/mime-detection/list | 1 | ||||
-rw-r--r-- | tests/mime-detection/test.pyi | 1 |
3 files changed, 3 insertions, 0 deletions
diff --git a/data/freedesktop.org.xml.in b/data/freedesktop.org.xml.in index cfa4b4c1..5bfa2cbb 100644 --- a/data/freedesktop.org.xml.in +++ b/data/freedesktop.org.xml.in @@ -6405,6 +6405,7 @@ command to generate the output files. <glob pattern="*.py" weight="50"/><!-- 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> diff --git a/tests/mime-detection/list b/tests/mime-detection/list index ee124de0..a9079f92 100644 --- a/tests/mime-detection/list +++ b/tests/mime-detection/list @@ -387,6 +387,7 @@ test_issue127.py text/x-python ox # Python 3 script test3.py text/x-python3 x test.py3 text/x-python3 +test.pyi text/x-python3 ox # PySide pyside.py text/x-python # SageMath diff --git a/tests/mime-detection/test.pyi b/tests/mime-detection/test.pyi new file mode 100644 index 00000000..d02057be --- /dev/null +++ b/tests/mime-detection/test.pyi @@ -0,0 +1 @@ +def func() -> None: ... |