[Twisted-Python] Twisted 21.7.0 Pre-Release Announcement
Richard van der Hoff
richard at matrix.org
Fri Jul 16 03:20:42 MDT 2021
On 16/07/2021 00:18, Glyph wrote:
>
>
>> On Jul 15, 2021, at 9:00 AM, Richard van der Hoff <richard at matrix.org
>> <mailto:richard at matrix.org>> wrote:
>>
>> We can't just go and add type annotations because we need to maintain
>> compatibility with older Twisted (to make it possible to package in
>> Debian et al).
>>
>> Any suggestions for keeping mypy happy?
>>
> Are you saying you need it to typecheck against older versions or just
> run against them?
Ah, this gave me the clue I needed. We just need to run against them.
Which means I can put type hints in comments, where they will be ignored
at runtime. It's fiddly, but it will work well enough.
Thanks Glyph, and thanks to Adi and Barry for your suggestions too.
One particular problem I came across was the type annotation on
inlineCallbacks. I've filed https://twistedmatrix.com/trac/ticket/10231
about it - would appreciate thoughts.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: </pipermail/twisted-python/attachments/20210716/f20f7295/attachment-0001.htm>
More information about the Twisted-Python
mailing list