Add docutils definitions and (incomplete) modules#5192
Add docutils definitions and (incomplete) modules#5192JelleZijlstra merged 11 commits intopython:masterfrom
Conversation
|
python/mypy#10242, cc @rchen152: Could you have a look at the pytype errors? I can't make sense of them. I suspect this is also related to using |
|
The pytype test failures are caused by pytype assuming that some imports are modules when they're actually classes. I filed google/pytype#882. You should be able to work around this by modifying the imports that pytype is unhappy with like this: |
JelleZijlstra
left a comment
There was a problem hiding this comment.
Thanks! Just two comments
stubs/docutils/docutils/io.pyi
Outdated
| encoding: Optional[str] = ..., | ||
| error_handler: str = ..., | ||
| autoclose: bool = ..., | ||
| mode: Literal["r", "rb"] = ..., |
There was a problem hiding this comment.
This is the default but not the only possibility; it also allows rU in Python 2 at least.
stubs/docutils/docutils/io.pyi
Outdated
| def close(self) -> None: ... | ||
|
|
||
| class FileOutput(Output): | ||
| mode: ClassVar[Literal["w", "wb"]] |
There was a problem hiding this comment.
This can also be wider; I guess we can use the aliases from _typeshed
|
According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉 |
1 similar comment
|
According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉 |
No description provided.