[Pydev-cvs] org.python.pydev/PySrc/ThirdParty/logilab/pylint/test/input func_noerror_exception.py,NO
Brought to you by:
fabioz
From: Fabio Z. <fa...@us...> - 2005-02-16 16:46:27
|
Update of /cvsroot/pydev/org.python.pydev/PySrc/ThirdParty/logilab/pylint/test/input In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7532/PySrc/ThirdParty/logilab/pylint/test/input Modified Files: func_w0231.py func_w0223.py func_indent.py func_w0233.py Added Files: func_noerror_exception.py func_noerror_mcs_attr_access.py func_noerror_access_attr_before_def_false_positive.py func_noerror_builtin_module_test.py Log Message: New pylint version --- NEW FILE: func_noerror_builtin_module_test.py --- """test import from a builtin module""" __revision__ = None from math import log10 def log10_2(): """bla bla bla""" return log10(2) --- NEW FILE: func_noerror_access_attr_before_def_false_positive.py --- #pylint: disable-msg=C0103,R0904 """ This module demonstrates a possible problem of pyLint with calling __init__ s from inherited classes. Initializations done there are not considered, which results in Error E0203 for self.cookedq. """ __revision__ = 'yo' import telnetlib class SeeTelnet(telnetlib.Telnet): """ Extension of telnetlib. """ def __init__(self, host=None, port=0): """ Constructor. When called without arguments, create an unconnected instance. With a hostname argument, it connects the instance; a port number is optional. Parameter: - host: IP address of the host - port: Port number """ telnetlib.Telnet.__init__(self, host, port) def readUntilArray(self, matches, _=None): """ Read until a given string is encountered or until timeout. ... """ self.process_rawq() maxLength = 0 index = -1 for match in matches: index += 1 if len(match) > maxLength: maxLength = len(match) --- NEW FILE: func_noerror_exception.py --- """ module doc """ __revision__ = '' class MyException(Exception): """a custom exception with its *own* __init__ !!""" def __init__(self, msg): Exception.__init__(self, msg) --- NEW FILE: func_noerror_mcs_attr_access.py --- # pylint: disable-msg=R0903 """test attribute access on metaclass""" __revision__ = 'yo' class Meta(type): """the meta class""" def __init__(mcs, name, bases, dictionary): super(Meta, mcs).__init__(name, bases, dictionary) print mcs._meta_args delattr(mcs, '_meta_args') class Test(object): """metaclassed class""" __metaclass__ = Meta _meta_args = ('foo', 'bar') def __init__(self): print '__init__' |