[Differential] [Request, 74 lines] D3920: Improve doc-hints `returnContentEqualsContentOf` and `addsTypeOfArgContent`

flherne (Francis Herne) noreply at phabricator.kde.org
Mon Jan 2 18:36:06 UTC 2017


flherne created this revision.
flherne added a reviewer: brauch.
flherne set the repository for this revision to R53 KDevelop: Python Support.
Restricted Application added a subscriber: kdevelop-devel.

REVISION SUMMARY
  These only worked when the source type was a ListType-based container.
  Most notably, this excluded tuples, so `list((1, 2, 3))` didn't work.
  
  This was also wrong when the source was a dict - it uses the key type, so `list({'a': 1})` should be `list of str` rather than `list of int`. Custom iterable types weren't supported.
  
  Regression for `dict({'a': 1}) - before, it got type `dict of int` - the key type was lost, but at least the value type was correct.
  Now it gets type `dict of str`, which is just plain wrong.
  The sequence-of-tuples case was never handled; we really just need a new hint for this method.

TEST PLAN
  One test (dict_of_int_call) goes from passing (but partially incorrect) to failing.
  One new XFAIL test (dict_from_tuples).
  
  Improved two tests; still pass (dict_of_int, dict_access)
  Six new tests fail->pass.
  
  Not duchainified yet.

REPOSITORY
  R53 KDevelop: Python Support

REVISION DETAIL
  https://phabricator.kde.org/D3920

AFFECTED FILES
  duchain/declarationbuilder.cpp
  duchain/expressionvisitor.cpp
  duchain/tests/pyduchaintest.cpp

EMAIL PREFERENCES
  https://phabricator.kde.org/settings/panel/emailpreferences/

To: flherne, brauch
Cc: kdevelop-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20170102/128b3864/attachment.html>


More information about the KDevelop-devel mailing list