Closed DetachHead closed 2 weeks ago
According to mypy_primer, this change doesn't affect type check results on a corpus of open source code. ✅
According to mypy_primer, this change doesn't affect type check results on a corpus of open source code. ✅
According to mypy_primer, this change doesn't affect type check results on a corpus of open source code. ✅
According to mypy_primer, this change doesn't affect type check results on a corpus of open source code. ✅
According to mypy_primer, this change doesn't affect type check results on a corpus of open source code. ✅
According to mypy_primer, this change doesn't affect type check results on a corpus of open source code. ✅
According to mypy_primer, this change doesn't affect type check results on a corpus of open source code. ✅
@DetachHead python 3.8 has a few other minor issues besides just the libcst version, I've pushed a fix to support 3.8 fully. I think you missed 3.8
in based_build/generateAllDocstubs.sh
.
I've also added a run
function that accepts kwargs rather than a list of string arguments, for easier usage when running programmatically.
oh oops, nice catch. thanks!
fixed in #423
I think docstrings can be added to the whole stdlib. Current it seems to be only done with builtin.pyi
?
yeah i did that on purpose. i only made it run on compiled builtins because i figured running it on the entire stdlib would unnecessarily make it slower to build and increase the risk of something going wrong. since pyright can already see docstrings from all the other stdlib modules anyway i didn't see the point.
feel free to raise an issue if you disagree. i'm open to changing this behavior in the future if that's what people want
Ah, got it. We only need it for compiled modules. NVM.
Ah, got it. We only need it for compiled modules. NVM.
Hmm... doesn't seem to be this case.
import re
if m := re.search('foo', 'foo'):
aa = m.group()
# ^^^^^ no docstring for `group`
>>> import inspect, re; m = re.search('foo', 'foo'); inspect.getdoc(m.group)
'group([group1, ...]) -> str or tuple.\nReturn subgroup(s) of the match by indices or names.\nFor 0 returns the entire match.'
There can a lot of built-in things still implemented in C. So I would still consider that dosctrings should be generated for the whole stdlib typeshed-fallback.
oh man that's annoying, i didn't know there were modules that are only partially compiled. also it looks like pylance has the same issue
i opened #428 to track this
fixes #160
a few things we need to address before merging tho:
"fromEnvironment"
importStrategy
)