typeshed
typeshed copied to clipboard
Add `wurlitzer` stubs
According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉
According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉
According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉
According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉
Thanks for the (very fast :open_mouth: ) review, I'll look into using protocols.
Edit: looks like some overloads will be required to get precise return types, I'm passing this PR back into draft mode for now.
According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉
According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉
@AlexWaygood Do you know what in the overloads is causing the CI to fail ?
According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉
The error looks like a bug in stubtest, but you can probably work around it by not using overloaded context managers. Instead of @contextmanager together with -> Iterator[Foo], you could try -> AbstractContextManager[Foo] or -> _GeneratorContextManager[Foo]. You need to import from contextlib.
The error looks like a bug in stubtest, but you can probably work around it by not using overloaded context managers. Instead of
@contextmanagertogether with-> Iterator[Foo], you could try-> AbstractContextManager[Foo]or-> _GeneratorContextManager[Foo]. You need to import fromcontextlib.
Yeah, @Akuli is right. Stubtest in general isn't great at dealing with several decorators on a single function -- see https://github.com/python/mypy/issues/14950 (which is now fixed, but was only fixed by special-casing @final).
According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉
According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉
@AlexWaygood If you have time to review the changes.
@Akuli Thanks for the improvements/fixes!
According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉