[Python-projects] Pylint bug: false error message "Module 'pysvn' has no 'wc_status_kind' member".

Barry Scott barry.scott at onelan.co.uk
Fri Feb 9 12:04:38 CET 2007


Sylvain Thénault wrote:
> On Friday 09 February à 10:19, Barry Scott wrote:
>   
>> Sylvain Thénault wrote:
>>     
>>> On Thursday 08 February à 16:55, Barry Scott wrote:
>>>       
>>>> Is pylint failing to find wc_status_kind because its defined in a python 
>>>> extension?
>>>>
>>>> The pysvn module import * from _pysvn and _pysvn is an extension.
>>>>    
>>>>         
>>> well, it might be if _pysvn C defined objects don't have __module__
>>> correctly set to '_pysvn' in this case.
>>>       
>> What do you mean by correctly set? How does pylint figure out the members of
>> an extension module? Why do you need __module__ set and on what?
>>
>> I happy to change pysvn to get this working once I understand the issue.
>>     
>
> that's because when it build astng representation for C extension
> module, it has to check the __module__ attribute of objects found 
> in the module (using dir(module)) to check they are actually belonging
> to this module. Without that, it may get a wrong representation of this
> module or even goes into possible infinite recursion problems.
>
>   
o.k. for my objects you need me to return __module__. I take it that for 
int and string
etc you just record that then variable exists. For example the copyright 
variable in pysvn
is a PyString.

Barry



More information about the Python-Projects mailing list