Conversation
synmark/__main__.py
Outdated
| reactor.run() | ||
|
|
||
| return d.result | ||
| return cast(float, d.result) |
There was a problem hiding this comment.
Surprised a cast is needed here. Any idea why?
There was a problem hiding this comment.
synmark/__main__.py:61: error: Incompatible return value type (got "object", expected "float") [return-value]
I think the Deferred isn't being properly marked as returning a float? (Maybe the Twisted trunk fixes this?)
There was a problem hiding this comment.
I couldn't quite figure this out, I think twisted trunk would fix it though.
DMRobertson
left a comment
There was a problem hiding this comment.
Apart from #16421 (comment) though this seems sane!
| return res | ||
|
|
||
| d.addBoth(on_done) | ||
| reactor.callWhenRunning(lambda: d.callback(True)) |
There was a problem hiding this comment.
Surprised mypy doesn't complain about feeding a bool into a Deferred[float]!
DMRobertson
left a comment
There was a problem hiding this comment.
I'm happy, provided you've tested that synmark still actually runs!
|
I have! The logging suite seems broken unrelated to this PR so I Don't want to hold this up. |
Was trying to figure out synmark the other day and type hints were helpful.