[Pydev-cvs] org.python.pydev/PySrc/ThirdParty/logilab/pylint PKG-INFO,1.3,1.4 __pkginfo__.py,1.3,1.4
Brought to you by:
fabioz
From: Fabio Z. <fa...@us...> - 2005-02-16 16:46:25
|
Update of /cvsroot/pydev/org.python.pydev/PySrc/ThirdParty/logilab/pylint In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7532/PySrc/ThirdParty/logilab/pylint Modified Files: PKG-INFO __pkginfo__.py interfaces.py utils.py gui.py config.py ChangeLog README setup.py __init__.py lint.py Log Message: New pylint version Index: utils.py =================================================================== RCS file: /cvsroot/pydev/org.python.pydev/PySrc/ThirdParty/logilab/pylint/utils.py,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** utils.py 21 Jan 2005 17:46:21 -0000 1.1 --- utils.py 16 Feb 2005 16:45:37 -0000 1.2 *************** *** 93,97 **** self._module_msgs_state = None self._msg_cats_state = {} ! self._module_msg_cats_state = None def register_messages(self, checker): --- 93,97 ---- self._module_msgs_state = None self._msg_cats_state = {} ! self._module_msg_cats_state = None def register_messages(self, checker): Index: ChangeLog =================================================================== RCS file: /cvsroot/pydev/org.python.pydev/PySrc/ThirdParty/logilab/pylint/ChangeLog,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** ChangeLog 21 Jan 2005 17:42:02 -0000 1.3 --- ChangeLog 16 Feb 2005 16:45:42 -0000 1.4 *************** *** 2,5 **** --- 2,37 ---- ==================== + 2005-02-16 -- 0.6.2 + * fix false positive on E0201 ("access to undefined member") with + metaclasses + + * fix false positive on E0203 ("access to member before its + definition") when attributes are defined in a parent class + + * fix false positive on W0706 ("identifier used to raise an exception + assigned to...") + + * fix interpretation of "\t" as value for the indent-string + configuration variable + + * fix --rcfile so that --rcfile=pylintrc (only --rcfile pylintrc was + working in earlier release) + + * new raw checker example in the examples/ directory + + + + 2005-02-04 -- 0.6.1 + * new --rcfile option to specify the configuration file without the + PYLINTRC environment variable + + * added an example module for a custom pylint checker (see the + example/ directory) + + * some fixes to handle fixes in common 0.9.1 (should however still working + with common 0.9.0, even if upgrade is recommended) + + + 2005-01-20 -- 0.6.0 * refix pylint emacs mode *************** *** 28,31 **** --- 60,65 ---- * improved tests coverage + + 2004-10-19 -- 0.5.0 Index: PKG-INFO =================================================================== RCS file: /cvsroot/pydev/org.python.pydev/PySrc/ThirdParty/logilab/pylint/PKG-INFO,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** PKG-INFO 21 Jan 2005 17:42:02 -0000 1.3 --- PKG-INFO 16 Feb 2005 16:45:37 -0000 1.4 *************** *** 1,5 **** Metadata-Version: 1.0 Name: pylint ! Version: 0.6.0 Summary: python code static checker Home-page: http://www.logilab.org/projects/pylint --- 1,5 ---- Metadata-Version: 1.0 Name: pylint ! Version: 0.6.2 Summary: python code static checker Home-page: http://www.logilab.org/projects/pylint Index: lint.py =================================================================== RCS file: /cvsroot/pydev/org.python.pydev/PySrc/ThirdParty/logilab/pylint/lint.py,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** lint.py 3 Feb 2005 12:31:14 -0000 1.6 --- lint.py 16 Feb 2005 16:45:42 -0000 1.7 *************** *** 40,48 **** from logilab.pylint.checkers import utils - import sys - import os import re import tokenize ! from os.path import dirname, basename, splitext, exists, isdir, join from logilab.common.configuration import OptionsManagerMixIn --- 40,46 ---- from logilab.pylint.checkers import utils import re import tokenize ! from os.path import dirname, basename, splitext, exists, isdir, join, normpath from logilab.common.configuration import OptionsManagerMixIn *************** *** 78,81 **** --- 76,82 ---- representation. This is usually accomopagned by a traceback. \ Please report such errors !'), + 'F0003': ('ignored builtin module %s', + 'Used to indicate that the user asked to analyze a builtin module\ + which has been skipped.'), 'I0001': ('Unable to run raw checkers on built-in module %s', *************** *** 117,155 **** may_be_disabled = False ! options = (("ignore", ! {'type' : "csv", 'metavar' : "<file>", ! 'dest' : "black_list", "default" : ('CVS',), ! 'help' : "Add <file or directory> to the black list. It \ ! should be a base name, not a path. You may set this option multiple times."}), ! ("persistent", {'default': 1, 'type' : 'yn', 'metavar' : '<y_or_n>', 'help' : 'Pickle collected data for later comparisons.'}), ! ("cache-size", {'default': 500, 'type' : 'int', 'metavar': '<size>', ! 'help' : "Set the cache size for astng objects."}), ! ("reports", {'default': 1, 'type' : 'yn', 'metavar' : '<y_or_n>', 'group': 'Reports', ! 'help' : "Tells wether to display a full report or only the\ ! messages"}), ! ("html", {'default': 0, 'type' : 'yn', 'metavar' : '<y_or_n>', 'group': 'Reports', ! 'help' : "Use HTML as output format instead of text"}), ! ("parseable", {'default': 0, 'type' : 'yn', 'metavar' : '<y_or_n>', 'group': 'Reports', ! 'help' : "Use a parseable text output format, so your favorite\ ! text editor will be able to jump to the line corresponding to a message."}), ! ("color", {'default': 0, 'type' : 'yn', 'metavar' : '<y_or_n>', 'group': 'Reports', ! 'help' : "Colorizes text output using ansi escape codes"}), ! ("files-output", {'default': 0, 'type' : 'yn', 'metavar' : '<y_or_n>', 'group': 'Reports', --- 118,156 ---- may_be_disabled = False ! options = (('ignore', ! {'type' : 'csv', 'metavar' : '<file>', ! 'dest' : 'black_list', 'default' : ('CVS',), ! 'help' : 'Add <file or directory> to the black list. It \ ! should be a base name, not a path. You may set this option multiple times.'}), ! ('persistent', {'default': 1, 'type' : 'yn', 'metavar' : '<y_or_n>', 'help' : 'Pickle collected data for later comparisons.'}), ! ('cache-size', {'default': 500, 'type' : 'int', 'metavar': '<size>', ! 'help' : 'Set the cache size for astng objects.'}), ! ('reports', {'default': 1, 'type' : 'yn', 'metavar' : '<y_or_n>', 'group': 'Reports', ! 'help' : 'Tells wether to display a full report or only the\ ! messages'}), ! ('html', {'default': 0, 'type' : 'yn', 'metavar' : '<y_or_n>', 'group': 'Reports', ! 'help' : 'Use HTML as output format instead of text'}), ! ('parseable', {'default': 0, 'type' : 'yn', 'metavar' : '<y_or_n>', 'group': 'Reports', ! 'help' : 'Use a parseable text output format, so your favorite\ ! text editor will be able to jump to the line corresponding to a message.'}), ! ('color', {'default': 0, 'type' : 'yn', 'metavar' : '<y_or_n>', 'group': 'Reports', ! 'help' : 'Colorizes text output using ansi escape codes'}), ! ('files-output', {'default': 0, 'type' : 'yn', 'metavar' : '<y_or_n>', 'group': 'Reports', *************** *** 158,162 **** Reports (if any) will be written in a file name "pylint_global.[txt|html]".'}), ! ("evaluation", {'type' : 'string', 'metavar' : '<python_expression>', 'group': 'Reports', --- 159,163 ---- Reports (if any) will be written in a file name "pylint_global.[txt|html]".'}), ! ('evaluation', {'type' : 'string', 'metavar' : '<python_expression>', 'group': 'Reports', *************** *** 169,173 **** global evaluation report (R0004).'}), ! ("comment", {'default': 0, 'type' : 'yn', 'metavar' : '<y_or_n>', 'group': 'Reports', --- 170,174 ---- global evaluation report (R0004).'}), ! ('comment', {'default': 0, 'type' : 'yn', 'metavar' : '<y_or_n>', 'group': 'Reports', *************** *** 175,209 **** This is used by the global evaluation report (R0004).'}), ! ("include-ids", ! {'type' : "yn", 'metavar' : '<y_or_n>', 'default' : 0, 'group': 'Reports', ! 'help' : "Include message's id in output"}), ! ("enable-msg-cat", {'type' : 'csv', 'metavar': '<msg cats>', 'group': 'Reports', 'help' : 'Enable all messages in the listed categories.'}), ! ("disable-msg-cat", {'type' : 'csv', 'metavar': '<msg cats>', 'group': 'Reports', 'help' : 'Disable all messages in the listed categories.'}), ! ("enable-msg", {'type' : 'csv', 'metavar': '<msg ids>', 'group': 'Reports', 'help' : 'Enable the message with the given id.'}), ! ("disable-msg", {'type' : 'csv', 'metavar': '<msg ids>', 'group': 'Reports', 'help' : 'Disable the message with the given id.'}), ! ("enable-report", {'type' : 'csv', 'metavar': '<rpt ids>', 'group': 'Reports', 'help' : 'Enable the report with the given id.'}), ! ("disable-report", {'type' : 'csv', 'metavar': '<rpt ids>', 'group': 'Reports', --- 176,210 ---- This is used by the global evaluation report (R0004).'}), ! ('include-ids', ! {'type' : 'yn', 'metavar' : '<y_or_n>', 'default' : 0, 'group': 'Reports', ! 'help' : 'Include message\'s id in output'}), ! ('enable-msg-cat', {'type' : 'csv', 'metavar': '<msg cats>', 'group': 'Reports', 'help' : 'Enable all messages in the listed categories.'}), ! ('disable-msg-cat', {'type' : 'csv', 'metavar': '<msg cats>', 'group': 'Reports', 'help' : 'Disable all messages in the listed categories.'}), ! ('enable-msg', {'type' : 'csv', 'metavar': '<msg ids>', 'group': 'Reports', 'help' : 'Enable the message with the given id.'}), ! ('disable-msg', {'type' : 'csv', 'metavar': '<msg ids>', 'group': 'Reports', 'help' : 'Disable the message with the given id.'}), ! ('enable-report', {'type' : 'csv', 'metavar': '<rpt ids>', 'group': 'Reports', 'help' : 'Enable the report with the given id.'}), ! ('disable-report', {'type' : 'csv', 'metavar': '<rpt ids>', 'group': 'Reports', *************** *** 216,220 **** ) ! def __init__(self, options=(), reporter=None, option_groups=()): # some stuff has to be done before ancestors initialization... # --- 217,222 ---- ) ! def __init__(self, options=(), reporter=None, option_groups=(), ! pylintrc=None): # some stuff has to be done before ancestors initialization... # *************** *** 240,248 **** 'enable-msg-cat': self.enable_message_category, 'disable-msg-cat': self.disable_message_category} ! full_version = "%%prog %s\nPython %s" % (version, sys.version) OptionsManagerMixIn.__init__(self, usage=__doc__, version=full_version, ! config_file=config.PYLINTRC) MessagesHandlerMixIn.__init__(self) ReportsHandlerMixIn.__init__(self) --- 242,250 ---- 'enable-msg-cat': self.enable_message_category, 'disable-msg-cat': self.disable_message_category} ! full_version = '%%prog %s\nPython %s' % (version, sys.version) OptionsManagerMixIn.__init__(self, usage=__doc__, version=full_version, ! config_file=pylintrc or config.PYLINTRC) MessagesHandlerMixIn.__init__(self) ReportsHandlerMixIn.__init__(self) *************** *** 304,307 **** --- 306,311 ---- for r_id, r_title, r_cb in checker.reports: self.register_report(r_id, r_title, r_cb, checker) + if checker.__doc__ is None: + checker.__doc__ = 'no documentation available for this checker' need_space = 80 - (len(checker.__doc__.splitlines()[-1]) % 80) checker.__doc__ += """%s *************** *** 367,371 **** # check modules or packages for something in files_or_modules: ! self.base_name = self.base_file = something if exists(something): # this is a file or a directory --- 371,375 ---- # check modules or packages for something in files_or_modules: ! self.base_name = self.base_file = normpath(something) if exists(something): # this is a file or a directory *************** *** 383,386 **** --- 387,394 ---- try: filepath = file_from_modpath(modname.split('.')) + if filepath is None: + self.set_current_module(modname) + self.add_message('F0003', args=modname) + continue except Exception, ex: #if __debug__: *************** *** 388,392 **** # traceback.print_exc() self.set_current_module(modname) ! self.add_message('F0001', args=str(ex)) continue if self.config.files_output: --- 396,401 ---- # traceback.print_exc() self.set_current_module(modname) ! msg = str(ex).replace(os.getcwd() + os.sep, '') ! self.add_message('F0001', args=msg) continue if self.config.files_output: *************** *** 406,410 **** # get the given module representation self.base_name = modname ! self.base_file = filepath # check this module astng = self._check_file(filepath, modname, checkers) --- 415,419 ---- # get the given module representation self.base_name = modname ! self.base_file = normpath(filepath) # check this module astng = self._check_file(filepath, modname, checkers) *************** *** 626,665 **** def __init__(self, args, reporter=None, quiet=0): ! from logilab.pylint import checkers self.linter = linter = PyLinter(( ! ("zope", ! {'action' : "callback", 'callback' : self.cb_init_zope, ! 'help' : "Initialize Zope products before starting."}), ! ("disable-all", ! {'action' : "callback", 'callback' : self.cb_disable_all_checkers, 'help' : '''Disable all possible checkers. This option should precede enable-* options.'''}), ! ("help-msg", ! {'action' : "callback", 'type' : 'string', 'metavar': '<msg-id>', 'callback' : self.cb_help_message, 'help' : '''Display a help message for the given message id and \ exit. This option may be a comma separated list.'''}), ! ("list-msgs", ! {'action' : "callback", 'metavar': '<msg-id>', 'callback' : self.cb_list_messages, 'help' : 'List and explain every available messages.'}), ! ("generate-rcfile", ! {'action' : "callback", 'callback' : self.cb_generate_config, 'help' : '''Generate a sample configuration file according to \ the current configuration. You can put other options before this one to use \ them in the configuration. This option causes the program to exit'''}), ! ("profile", ! {'action' : "store_true", 'help' : 'Profiled execution.'}), ! ), reporter=reporter) linter.quiet = quiet # register checkers checkers.initialize(linter) # add some help section --- 635,685 ---- def __init__(self, args, reporter=None, quiet=0): ! rcfile = None ! if '--rcfile' in args: ! rcindex = args.index('--rcfile') ! rcfile = args[rcindex + 1] ! del args[rcindex + 1] ! del args[rcindex] self.linter = linter = PyLinter(( ! ('rcfile', ! {'action' : 'callback', 'callback' : lambda *args: 1, ! 'type': 'string', 'metavar': '<file>', ! 'help' : 'Specify a configuration file.'}), ! ! ('zope', ! {'action' : 'callback', 'callback' : self.cb_init_zope, ! 'help' : 'Initialize Zope products before starting.'}), ! ('disable-all', ! {'action' : 'callback', 'callback' : self.cb_disable_all_checkers, 'help' : '''Disable all possible checkers. This option should precede enable-* options.'''}), ! ('help-msg', ! {'action' : 'callback', 'type' : 'string', 'metavar': '<msg-id>', 'callback' : self.cb_help_message, 'help' : '''Display a help message for the given message id and \ exit. This option may be a comma separated list.'''}), ! ('list-msgs', ! {'action' : 'callback', 'metavar': '<msg-id>', 'callback' : self.cb_list_messages, 'help' : 'List and explain every available messages.'}), ! ('generate-rcfile', ! {'action' : 'callback', 'callback' : self.cb_generate_config, 'help' : '''Generate a sample configuration file according to \ the current configuration. You can put other options before this one to use \ them in the configuration. This option causes the program to exit'''}), ! ('profile', ! {'action' : 'store_true', 'help' : 'Profiled execution.'}), ! ), reporter=reporter, pylintrc=rcfile) linter.quiet = quiet # register checkers + from logilab.pylint import checkers checkers.initialize(linter) # add some help section *************** *** 680,684 **** args = linter.load_command_line_configuration(args) if not args: ! linter.help() sys.exit(1) # insert current working directory to the python path to have a correct --- 700,704 ---- args = linter.load_command_line_configuration(args) if not args: ! print linter.help() sys.exit(1) # insert current working directory to the python path to have a correct *************** *** 688,695 **** print >> sys.stderr, '** profiled run' from hotshot import Profile, stats ! prof = Profile("stones.prof") prof.runcall(linter.check, args) prof.close() ! stats = stats.load("stones.prof") stats.strip_dirs() stats.sort_stats('time', 'calls') --- 708,715 ---- print >> sys.stderr, '** profiled run' from hotshot import Profile, stats ! prof = Profile('stones.prof') prof.runcall(linter.check, args) prof.close() ! stats = stats.load('stones.prof') stats.strip_dirs() stats.sort_stats('time', 'calls') *************** *** 728,732 **** ! if __name__ == "__main__": #patched import sys --- 748,752 ---- ! if __name__ == '__main__': #patched import sys Index: __pkginfo__.py =================================================================== RCS file: /cvsroot/pydev/org.python.pydev/PySrc/ThirdParty/logilab/pylint/__pkginfo__.py,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** __pkginfo__.py 21 Jan 2005 17:42:02 -0000 1.3 --- __pkginfo__.py 16 Feb 2005 16:45:37 -0000 1.4 *************** *** 22,26 **** modname = 'pylint' ! numversion = (0, 6, 0) version = '.'.join([str(num) for num in numversion]) --- 22,26 ---- modname = 'pylint' ! numversion = (0, 6, 2) version = '.'.join([str(num) for num in numversion]) *************** *** 49,53 **** web = "http://www.logilab.org/projects/%s" % modname ftp = "ftp://ftp.logilab.org/pub/%s" % modname ! mailinglist = "mailto://pyt...@li..." from os.path import join --- 49,53 ---- web = "http://www.logilab.org/projects/%s" % modname ftp = "ftp://ftp.logilab.org/pub/%s" % modname ! mailinglist = "mailto://pyt...@lo..." from os.path import join Index: README =================================================================== RCS file: /cvsroot/pydev/org.python.pydev/PySrc/ThirdParty/logilab/pylint/README,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** README 21 Jan 2005 17:42:02 -0000 1.2 --- README 16 Feb 2005 16:45:42 -0000 1.3 *************** *** 88,96 **** Contributors ------------ ! * Sylvain Thénault: main author / maintainer * Alexandre Fayolle: TkInter gui, documentation * Brian van den Broek: windows installation documentation * Wolfgang Grafen: feedback, feature requests such as message identifiers ! * Axel Müller: bug reports * All the Logilab's team: daily use, bug reports, feature requests * Other people have contributed by their feedback, if I've forgotten --- 88,97 ---- Contributors ------------ ! * Sylvain Thenault: main author / maintainer * Alexandre Fayolle: TkInter gui, documentation * Brian van den Broek: windows installation documentation * Wolfgang Grafen: feedback, feature requests such as message identifiers ! * Axel Muller: bug reports ! * Fabio Zadrozny: bug reports * All the Logilab's team: daily use, bug reports, feature requests * Other people have contributed by their feedback, if I've forgotten |