0

We've recently upgraded the version of Jedi we are using from 0.13.2 to 0.14.0.

Previously, we could check whether an item in Script.completions was a @property by attempting to access its param attribute. If the completion was a property (or a regular attribute variable), then this would raise an AttributeError.

However, in version 0.14.0, no AttributeError is raised for properties.

I've worked around this by checking the source as suggested here as a workaround for a similar issue:

if (completion.type == "function" and
        "@property" in completion.get_line_code(1)):

But this doesn't seem like a very clean solution.

Is there a better way of checking if a completion is a property in version 0.14.0?

Rich
  • 7,348
  • 4
  • 34
  • 54

0 Answers0