[PyQt] PyQt Digest, Vol 126, Issue 16
David Cortesi
davecortesi at gmail.com
Fri Jan 9 16:16:55 GMT 2015
I just had the idea of developing a static analyzer for typical PyQt
> issues, as a checker for pylint (http://www.pylint.org/).
>
> I'd like some input on what issues could be checked. What came to my
> mind so far:
> ...
> - Checking types of arguments (by extracting the desired ones from the
> docstrings?) - this will probably the hardest one, but also the one
> with the most benefits.
>
There has been a lot of activity recently on the
general subject of Python "type hinting" and "type checking"
with multiple competing syntaxes proposed.
Python 3 already has an obscurely-documented feature [2] allowing
you to annotate function args & result with type expressions.
I think these are compatible with PyQt class names?
There are other existing syntax proposals like Obiwan [3],
typecheck-decorator [4] or Ensure [5].
Guido just put out a semi-formal proposal for a framework [1].
[1]
https://mail.python.org/pipermail/python-ideas/2014-December/030430.html
[2] https://docs.python.org/3.3/reference/compound_stmts.html#index-23
[3] https://pypi.python.org/pypi/obiwan
[4] https://github.com/prechelt/typecheck-decorator
[5] https://github.com/kislyuk/ensure
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20150109/88d264aa/attachment.html>
More information about the PyQt
mailing list