diff options
-rw-r--r-- | README | 17 | ||||
-rw-r--r-- | __pkginfo__.py | 5 | ||||
-rw-r--r-- | checkers/similar.py | 2 | ||||
-rw-r--r-- | debian/control | 4 | ||||
-rwxr-xr-x | epylint.py | 12 | ||||
-rw-r--r-- | gui.py | 51 | ||||
-rw-r--r-- | man/epylint.1 | 14 | ||||
-rw-r--r-- | man/pylint-gui.1 | 15 | ||||
-rw-r--r-- | man/pyreverse.1 | 4 |
9 files changed, 90 insertions, 34 deletions
@@ -24,18 +24,23 @@ may be found in the user manual in the *doc* subdirectory. Documentation ------------- -Look in the doc/ subdirectory. +Look in the doc/ subdirectory or at the project home page +http://www.logilab.org/project/pylint + +Pylint is shipped with following additional commands: + +* pyreverse: an UML diagram generator +* symilar: an independent similarities checker +* epylint: Emacs and Flymake compatible Pylint +* pylint-gui: a graphical interface Comments, support, bug reports ------------------------------ -Project page on : +Project page and tracker on : http://www.logilab.org/project/pylint -Use the python-projects@logilab.org mailing list. Since we do not have -publicly available bug tracker yet, bug reports should be emailed -there too. - +Use the python-projects@logilab.org mailing list. You can subscribe to this mailing list at http://lists.logilab.org/mailman/listinfo/python-projects diff --git a/__pkginfo__.py b/__pkginfo__.py index b4442f5..eb46039 100644 --- a/__pkginfo__.py +++ b/__pkginfo__.py @@ -56,7 +56,10 @@ long_desc = """\ standard, or checking if declared interfaces are truly implemented, and much more. . - Additionally, it is possible to write plugins to add your own checks.""" + Additionally, it is possible to write plugins to add your own checks. + . + Pylint is shipped with "pylint-gui", "pyreverse" (UML diagram generator) + and "symilar" (an independent similarities checker).""" from os.path import join scripts = [join('bin', filename) diff --git a/checkers/similar.py b/checkers/similar.py index ae008b9..a647ada 100644 --- a/checkers/similar.py +++ b/checkers/similar.py @@ -302,7 +302,7 @@ def usage(status=0): """display command line usage information""" print "finds copy pasted blocks in a set of files" print - print 'Usage: similar [-d|--duplicates min_duplicated_lines] \ + print 'Usage: symilar [-d|--duplicates min_duplicated_lines] \ [-i|--ignore-comments] file1...' sys.exit(status) diff --git a/debian/control b/debian/control index fe0e930..d55705a 100644 --- a/debian/control +++ b/debian/control @@ -14,7 +14,7 @@ Vcs-Browser: http://svn.debian.org/viewsvn/python-apps/packages/pylint/trunk/ Package: pylint Architecture: all Depends: ${python:Depends}, ${misc:Depends}, python-logilab-common (>= 0.53.0), python-logilab-astng (>= 0.21.0) -Recommends: python-tk +Suggests: python-tk XB-Python-Version: ${python:Versions} Conflicts: python2.2-pylint, python2.3-pylint, python2.4-pylint, pylint-common, pylint-test Replaces: python2.2-pylint, python2.3-pylint, python2.4-pylint, pylint-common, pylint-test @@ -33,7 +33,7 @@ Description: python code static checker and UML diagram generator Additionally, it is possible to write plugins to add your own checks. . The included command pyreverse generates UML class and package - diagrams. + diagrams. The included symilar command is a separated similarities checker. . The recommended python-tk package is only for using the pylint-gui script. @@ -4,9 +4,9 @@ This script is for integration with emacs and is compatible with flymake mode. -This version of epylint traverses out of packages before invoking pylint. This avoids the reporting -of errors that occur when a module within package uses a full package import path to get hold of -another module within this package. +epylint walks out of python packages before invoking pylint. This avoids +reporting import errors that occur when a module within a package uses the +absolute import path to get another module within this package. For example: - Suppose a package is structured as @@ -23,8 +23,8 @@ For example: pylint a/c/y.py - - As this script will be invoked by emacs within the directory of the file we are checking - we need to traverse down out of it to avoid these false positives. + - As this script will be invoked by emacs within the directory of the file + we are checking we need to go out of it to avoid these false positives. You may also use py_run to run pylint with desired options and get back (or not) its output. @@ -94,7 +94,7 @@ def Run(): def py_run(command_options='', return_std=False, stdout=None, stderr=None, - script='pylint'): + script='epylint'): """Run pylint from python (needs Python >= 2.4). ``command_options`` is a string containing ``pylint`` command line options; @@ -5,8 +5,10 @@ import sys import re import Queue from threading import Thread -from Tkinter import Tk, Frame, Listbox, Entry, Label, Button, Scrollbar, Checkbutton, Radiobutton, IntVar, StringVar -from Tkinter import TOP, LEFT, RIGHT, BOTTOM, END, X, Y, BOTH, SUNKEN, W, HORIZONTAL, DISABLED, NORMAL, W, E +from Tkinter import (Tk, Frame, Listbox, Entry, Label, Button, Scrollbar, + Checkbutton, Radiobutton, IntVar, StringVar) +from Tkinter import (TOP, LEFT, RIGHT, BOTTOM, END, X, Y, BOTH, SUNKEN, W, + HORIZONTAL, DISABLED, NORMAL, W, E) from tkFileDialog import askopenfilename, askdirectory import pylint.lint @@ -194,7 +196,8 @@ class LintGui: #buttons Button(top_frame, text='Open', command=self.file_open).pack(side=LEFT) - Button(top_frame, text='Open Package', command=(lambda : self.file_open(package=True))).pack(side=LEFT) + Button(top_frame, text='Open Package', + command=(lambda : self.file_open(package=True))).pack(side=LEFT) self.btnRun = Button(top_frame, text='Run', command=self.run_lint) self.btnRun.pack(side=LEFT) @@ -207,12 +210,18 @@ class LintGui: self.warning_box = IntVar() self.error_box = IntVar() self.fatal_box = IntVar() - i = Checkbutton(check_frame, text="Information", fg=COLORS['(I)'], variable=self.information_box, command=self.refresh_msg_window) - c = Checkbutton(check_frame, text="Convention", fg=COLORS['(C)'], variable=self.convention_box, command=self.refresh_msg_window) - r = Checkbutton(check_frame, text="Refactor", fg=COLORS['(R)'], variable=self.refactor_box, command=self.refresh_msg_window) - w = Checkbutton(check_frame, text="Warning", fg=COLORS['(W)'], variable=self.warning_box, command=self.refresh_msg_window) - e = Checkbutton(check_frame, text="Error", fg=COLORS['(E)'], variable=self.error_box, command=self.refresh_msg_window) - f = Checkbutton(check_frame, text="Fatal", fg=COLORS['(F)'], variable=self.fatal_box, command=self.refresh_msg_window) + i = Checkbutton(check_frame, text="Information", fg=COLORS['(I)'], + variable=self.information_box, command=self.refresh_msg_window) + c = Checkbutton(check_frame, text="Convention", fg=COLORS['(C)'], + variable=self.convention_box, command=self.refresh_msg_window) + r = Checkbutton(check_frame, text="Refactor", fg=COLORS['(R)'], + variable=self.refactor_box, command=self.refresh_msg_window) + w = Checkbutton(check_frame, text="Warning", fg=COLORS['(W)'], + variable=self.warning_box, command=self.refresh_msg_window) + e = Checkbutton(check_frame, text="Error", fg=COLORS['(E)'], + variable=self.error_box, command=self.refresh_msg_window) + f = Checkbutton(check_frame, text="Fatal", fg=COLORS['(F)'], + variable=self.fatal_box, command=self.refresh_msg_window) i.select() c.select() r.select() @@ -229,13 +238,23 @@ class LintGui: #check boxes self.box = StringVar() # XXX should be generated - report = Radiobutton(radio_frame, text="Report", variable=self.box, value="Report", command=self.refresh_results_window) - rawMet = Radiobutton(radio_frame, text="Raw metrics", variable=self.box, value="Raw metrics", command=self.refresh_results_window) - dup = Radiobutton(radio_frame, text="Duplication", variable=self.box, value="Duplication", command=self.refresh_results_window) - ext = Radiobutton(radio_frame, text="External dependencies", variable=self.box, value="External dependencies", command=self.refresh_results_window) - stat = Radiobutton(radio_frame, text="Statistics by type", variable=self.box, value="Statistics by type", command=self.refresh_results_window) - msgCat = Radiobutton(radio_frame, text="Messages by category", variable=self.box, value="Messages by category", command=self.refresh_results_window) - msg = Radiobutton(radio_frame, text="Messages", variable=self.box, value="Messages", command=self.refresh_results_window) + report = Radiobutton(radio_frame, text="Report", variable=self.box, + value="Report", command=self.refresh_results_window) + rawMet = Radiobutton(radio_frame, text="Raw metrics", variable=self.box, + value="Raw metrics", command=self.refresh_results_window) + dup = Radiobutton(radio_frame, text="Duplication", variable=self.box, + value="Duplication", command=self.refresh_results_window) + ext = Radiobutton(radio_frame, text="External dependencies", + variable=self.box, value="External dependencies", + command=self.refresh_results_window) + stat = Radiobutton(radio_frame, text="Statistics by type", + variable=self.box, value="Statistics by type", + command=self.refresh_results_window) + msgCat = Radiobutton(radio_frame, text="Messages by category", + variable=self.box, value="Messages by category", + command=self.refresh_results_window) + msg = Radiobutton(radio_frame, text="Messages", variable=self.box, + value="Messages", command=self.refresh_results_window) report.select() report.grid(column=0, row=0, sticky=W) rawMet.grid(column=1, row=0, sticky=W) diff --git a/man/epylint.1 b/man/epylint.1 new file mode 100644 index 0000000..f2022e9 --- /dev/null +++ b/man/epylint.1 @@ -0,0 +1,14 @@ +.TH epylint 1 "2010-12-15" epylint +.SH NAME +.B epylint +\- Emacs and Flymake compatible Pylint + +.SH DESCRIPTION +.B epylint +is a Emacs and Flymake compatible Pylint. It runs Pylint from outside the +current package to avoid import error messages. See +.B pylint +\'s manpage for information about all available options. + +.SH "SEE ALSO" +.B pylint(1), pylint-gui(1) diff --git a/man/pylint-gui.1 b/man/pylint-gui.1 new file mode 100644 index 0000000..3bcbd21 --- /dev/null +++ b/man/pylint-gui.1 @@ -0,0 +1,15 @@ +.TH pylint-gui 1 "2010-12-15" pylint-gui +.SH NAME +.B pylint-gui +\- Tkinker gui for pylint + +.SH SYNOPSIS +.B pylint-gui + +.SH DESCRIPTION +.B pylint-gui +launches a nice graphical interface for running Pylint + +.SH "SEE ALSO" +.B pylint(1), pyreverse(1) + diff --git a/man/pyreverse.1 b/man/pyreverse.1 index c86da72..d37f83d 100644 --- a/man/pyreverse.1 +++ b/man/pyreverse.1 @@ -1,4 +1,4 @@ -.TH PYREVERSE 1 "August 18, 2008" pyreverse "User's Manual" +.TH pyreverse 1 "August 18, 2008" pyreverse "User's Manual" .SH NAME pyreverse \- parse python sources files and extract diagrams from them. @@ -34,7 +34,7 @@ You can do \-c <class1> , \-c <class2>. .SH OPTIONS .IP "-h, --help" -show this help message and exit +show help message and exit .IP "-p<name>, --project=<name>" set project name to <name> if not using \-c option. (default:'No Name') .IP "-i<file>, --ignore=<file>" |