[Twisted-Python] Running tests with monkeytype

Tom Most twm at freecog.net
Sat Jun 20 17:01:37 MDT 2020


On Sat, Jun 20, 2020, at 3:10 PM, Maarten ter Huurne wrote:
> Which also brings up the question: in the long term (*), do we want to 
> have both type annotations and types in the docstring? Or do we only 
> want to document types in docstrings if there is no exact annotations 
> possible in Python's type system?

Let's definitely move to type annotations, since they are much more likely to be correct due to validation by MyPy.

To start, we'll need to revise the Twisted coding standard [1] to permit type annotations instead of @type lines in the docstring. I think that we should suggest, but not require, annotation syntax to start. I filed a ticket [2] for this.

---Tom

[1]: https://twistedmatrix.com/documents/current/core/development/policy/coding-standard.html#docstrings
[2]: https://twistedmatrix.com/trac/ticket/9859



More information about the Twisted-Python mailing list