setup: include vendored 3rd party type stubs
authorMatt Harbison <matt_harbison@yahoo.com>
Wed, 23 Nov 2022 21:11:46 -0500
changeset 49771 54421ef8a423
parent 49770 86e398a3d598
child 49772 f5f113f1b011
setup: include vendored 3rd party type stubs While pytype may not support PEP 561, PyCharm does, so having the stubs available means it can determine `foo = attr.ib(type=int)` means `foo` is an int. This only applies when using Mercurial as a library, like with TortoiseHg development- PyCharm is already smart enough to use the *.pyi files in the Mercurial source tree when hacking on Mercurial itself. I left the mercurial.cext stubs out because it seems very low level, that 3rd parties shouldn't be using directly.
setup.py
--- a/setup.py	Wed Nov 23 20:59:53 2022 -0500
+++ b/setup.py	Wed Nov 23 21:11:46 2022 -0500
@@ -1607,6 +1607,10 @@
     'mercurial.helptext.internals': [
         '*.txt',
     ],
+    'mercurial.thirdparty.attr': [
+        '*.pyi',
+        'py.typed',
+    ],
 }