1.1 --- a/common.py Sat Oct 08 00:34:34 2016 +0200
1.2 +++ b/common.py Sat Oct 08 00:43:13 2016 +0200
1.3 @@ -811,7 +811,7 @@
1.4 else:
1.5 return "%s.%s" % (path, name)
1.6
1.7 -# Type deduction for usage.
1.8 +# Usage-related functions.
1.9
1.10 def get_types_for_usage(attrnames, objects):
1.11
1.12 @@ -826,6 +826,17 @@
1.13 types.append(name)
1.14 return types
1.15
1.16 +def get_invoked_attributes(usage):
1.17 +
1.18 + "Obtain invoked attribute from the given 'usage'."
1.19 +
1.20 + invoked = []
1.21 + if usage:
1.22 + for attrname, invocation in usage:
1.23 + if invocation:
1.24 + invoked.append(attrname)
1.25 + return invoked
1.26 +
1.27 # Useful data.
1.28
1.29 predefined_constants = "False", "None", "NotImplemented", "True"