Hi George, On 16 mai 11:34, George Schneeloch wrote:
I've been working on a pylint-brain plugin to do inference based on docstring type information. I'd like to set the order of type inference such that, if there is a type already found it uses that, else it uses what's in the docstring. Is there a way to do this? I'd also like to avoid clobbering other pylint-brain plugin results if possible. Is there a mechanism to set priority here? Currently the plugin will override all other inference if types are specified in the docstring, which may be undesirable.
Could you provide an example of what you would like to achieve and the problem you're encountering? I'm afraid there are no notion of "type inference priority" mecanism, but by better understanding of your problem one may have other idea. As a side note I would say that it sounds good to me that inference driven by annotation (python 3 or docstring based) would then only consider those types and not those from the "regular" inference. -- Sylvain Thénault, LOGILAB, Paris (01.45.32.03.12) - Toulouse (05.62.17.16.42) Formations Python, Debian, Méth. Agiles: http://www.logilab.fr/formations Développement logiciel sur mesure: http://www.logilab.fr/services CubicWeb, the semantic web framework: http://www.cubicweb.org