I am attaching a patch to update the man page.

I looked around, and found a program called help2man (there's a debian
package), which helped things along nicely. Unfortunately, it did still
take a bit of manual fiddling, so it probably can't be incorporated into
the build process.

But just in case it is useful, I'm also attaching the file I used with
help2man. Run:
$ help2man --include pychecker-manincludes > pychecker.1
and you'll recreate something similar.

Best,
Dan

-- 
Dan O'Huiginn
[EMAIL PROTECTED]
http://www.ohuiginn.net
diff -Nur pychecker-0.8.17.orig/debian/pychecker.1 pychecker-0.8.17/debian/pychecker.1
--- pychecker-0.8.17.orig/debian/pychecker.1	2007-12-21 02:34:41.000000000 +0100
+++ pychecker-0.8.17/debian/pychecker.1	2007-12-21 02:40:03.000000000 +0100
@@ -1,4 +1,5 @@
-.TH PYCHECKER 1 "July 23, 2006" "" ""
+.\" DO NOT MODIFY THIS FILE!  It was generated by help2man 1.36.
+.TH PYCHECKER "1" "December 2007" "pychecker 0.8.17" "User Commands"
 .SH NAME
 \fBpychecker \fP- program to check python scripts for common mistakes
 .SH SYNOPSIS
@@ -28,7 +29,7 @@
 By default, the /usr/bin/pychecker script executes pychecker using the default
 Python interpreter in /usr/bin/python.  Some users may want to run pychecker
 with a different Python interpreter.  To accomodate this, the
-/usr/bin/pychecker script supports the use of $PYTHONVER on the command-line,
+ /usr/bin/pychecker script supports the use of $PYTHONVER on the command-line,
 i.e.
 .TP
 .B
@@ -41,294 +42,257 @@
 supported by the current Debian Python infrastructure, not for any arbitrary
 Python interpreter installed in /usr/bin.
 .SH OPTIONS
-Long \fIoptions\fP can be preceded with no- to turn off (e.g., no-namedargs)
+Long \fIoptions\fP can be preceded with no- to turn off (e.g., no-namedargs). Default settings are indicated by [brackets]
 .PP
-Major Options:
+.SS "Major Options:"
 .TP
-.B
-\fB-e\fP, \fB--errors\fP
-turn off all warnings which are not likely errors
+\fB\-\-only\fR
+only warn about files passed on the command line [off]
 .TP
-.B
-\fB--complexity\fP
-turn off all warnings which are related to complexity
+\fB\-e\fR, \fB\-\-level\fR
+the maximum error level of warnings to be displayed
 .TP
-.B
-\fB-F\fP, \fB--config\fP
+\-#, \fB\-\-limit\fR
+the maximum number of warnings to be displayed [10]
+.TP
+\fB\-F\fR, \fB\-\-config\fR
 specify .pycheckrc file to use
-.PP
-Error Control:
 .TP
-.B
-\fB-i\fP, \fB--import\fP
+\fB\-\-quixote\fR
+support Quixote's PTL modules
+.TP
+\fB\-\-evil\fR
+list of evil C extensions that crash the interpreter [[]]
+.SS "Error Control:"
+.TP
+\fB\-i\fR, \fB\-\-import\fR
 unused imports [on]
--k, \fB--pkgimport\fP unused imports from __init__.py [on]
-\fB-M\fP, \fB--reimportself\fP module imports itself [on]
 .TP
-.B
-\fB-X\fP, \fB--reimport\fP
+\fB\-k\fR, \fB\-\-pkgimport\fR
+unused imports from __init__.py [on]
+.HP
+\fB\-M\fR, \fB\-\-reimportself\fR module imports itself [on]
+.TP
+\fB\-X\fR, \fB\-\-reimport\fR
 reimporting a module [on]
 .TP
-.B
-\fB-x\fP, \fB--miximport\fP
-module does import and from \.\.\. import [on]
+\fB\-x\fR, \fB\-\-miximport\fR
+module does import and from ... import [on]
 .TP
-.B
-\fB-l\fP, \fB--local\fP
+\fB\-l\fR, \fB\-\-local\fR
 unused local variables, except tuples [on]
 .TP
-.B
-\fB-t\fP, \fB--tuple\fP
+\fB\-t\fR, \fB\-\-tuple\fR
 all unused local variables, including tuples [off]
 .TP
-.B
-\fB-9\fP, \fB--members\fP
+\fB\-9\fR, \fB\-\-members\fR
 all unused class data members [off]
 .TP
-.B
-\fB-v\fP, \fB--var\fP
+\fB\-v\fR, \fB\-\-var\fR
 all unused module variables [off]
 .TP
-.B
-\fB-p\fP, \fB--privatevar\fP
+\fB\-p\fR, \fB\-\-privatevar\fR
 unused private module variables [on]
 .TP
-.B
-\fB-g\fP, \fB--allglobals\fP
+\fB\-g\fR, \fB\-\-allglobals\fR
 report each occurrence of global warnings [off]
 .TP
-.B
-\fB-n\fP, \fB--namedargs\fP
-functions called with named arguments (like keywords) [on]
+\fB\-n\fR, \fB\-\-namedargs\fR
+functions called with named arguments (like keywords) [off]
 .TP
-.B
-\fB-a\fP, \fB--initattr\fP
-Attributes (members) must be defined in \fB__init__\fP() [off]
--I, \fB--initsubclass\fP \fBSubclass.__init__\fP() not defined [off]
--u, \fB--callinit\fP \fBBaseclass.__init__\fP() not called [on]
+\fB\-a\fR, \fB\-\-initattr\fR
+Attributes (members) must be defined in __init__() [off]
+.HP
+\fB\-I\fR, \fB\-\-initsubclass\fR Subclass.__init__() not defined [off]
 .TP
-.B
-\fB-0\fP, \fB--abstract\fP
+\fB\-u\fR, \fB\-\-callinit\fR
+Baseclass.__init__() not called [on]
+.TP
+\fB\-0\fR, \fB\-\-abstract\fR
 Subclass needs to override methods that only throw exceptions [on]
 .TP
-.B
-\fB-N\fP, \fB--initreturn\fP
-Return None from \fB__init__\fP() [on]
+\fB\-N\fR, \fB\-\-initreturn\fR
+Return None from __init__() [on]
 .TP
-.B
-\fB-8\fP, \fB--unreachable\fP
+\fB\-8\fR, \fB\-\-unreachable\fR
 unreachable code [off]
 .TP
-.B
-\fB-2\fP, \fB--constCond\fP
+\fB\-2\fR, \fB\-\-constCond\fR
 a constant is used in a conditional statement [on]
 .TP
-.B
-\fB-1\fP, \fB--constant1\fP
+\fB\-1\fR, \fB\-\-constant1\fR
 1 is used in a conditional statement (if 1: or while 1:) [off]
 .TP
-.B
-\fB--stringiter\fP
+\fB\-\-stringiter\fR
 check if iterating over a string [on]
 .TP
-.B
-\fB-A\fP, \fB--callattr\fP
+\fB\-\-stringfind\fR
+check improper use of string.find() [on]
+.TP
+\fB\-A\fR, \fB\-\-callattr\fR
 Calling data members as functions [off]
 .TP
-.B
-\fB-y\fP, \fB--classattr\fP
+\fB\-y\fR, \fB\-\-classattr\fR
 class attribute does not exist [on]
 .TP
-.B
-\fB-S\fP, \fB--self\fP
+\fB\-S\fR, \fB\-\-self\fR
 First argument to methods [self]
+.HP
+\fB\-\-classmethodargs\fR First argument to classmethods [['cls', 'klass']]
 .TP
-.B
-\fB-T\fP, \fB--argsused\fP
+\fB\-T\fR, \fB\-\-argsused\fR
 unused method/function arguments [on]
 .TP
-.B
-\fB-z\fP, \fB--varargsused\fP
+\fB\-z\fR, \fB\-\-varargsused\fR
 unused method/function variable arguments [on]
 .TP
-.B
-\fB-G\fP, \fB--selfused\fP
+\fB\-G\fR, \fB\-\-selfused\fR
 ignore if self is unused in methods [off]
 .TP
-.B
-\fB-o\fP, \fB--override\fP
+\fB\-o\fR, \fB\-\-override\fR
 check if overridden methods have the same signature [on]
 .TP
-.B
-\fB-U\fP, \fB--reuseattr\fP
+\fB\-\-special\fR
+check if __special__ methods exist and have the correct signature [on]
+.TP
+\fB\-U\fR, \fB\-\-reuseattr\fR
 check if function/class/method names are reused [on]
 .TP
-.B
-\fB-Y\fP, \fB--positive\fP
+\fB\-Y\fR, \fB\-\-positive\fR
 check if using unary positive (+) which is usually meaningless [on]
 .TP
-.B
-\fB-j\fP, \fB--moddefvalue\fP
+\fB\-j\fR, \fB\-\-moddefvalue\fR
 check if modify (call method) on a parameter that has a default value [on]
 .TP
-.B
-\fB--changetypes\fP
+\fB\-\-changetypes\fR
 check if variables are set to different types [off]
 .TP
-.B
-\fB--unpack\fP
-check if unpacking a non-sequence [on]
+\fB\-\-unpack\fR
+check if unpacking a non\-sequence [on]
 .TP
-.B
-\fB--unpacklen\fP
+\fB\-\-unpacklen\fR
 check if unpacking sequence with the wrong length [on]
 .TP
-.B
-\fB--badexcept\fP
+\fB\-\-badexcept\fR
 check if raising or catching bad exceptions [on]
 .TP
-.B
-\fB-4\fP, \fB--noeffect\fP
+\fB\-4\fR, \fB\-\-noeffect\fR
 check if statement appears to have no effect [on]
 .TP
-.B
-\fB--modulo1\fP
+\fB\-\-modulo1\fR
 check if using (expr % 1), it has no effect on integers and strings [on]
 .TP
-.B
-\fB--isliteral\fP
-check if using (expr is const-literal), doesn't always
-work on integers and strings [on]
-.PP
-Possible Errors:
-.PP
-\fB-r\fP, \fB--returnvalues\fP check consistent return values [off]
-\fB-C\fP, \fB--implicitreturns\fP check if using implict and explicit return values [on]
+\fB\-\-isliteral\fR
+check if using (expr is const\-literal), doesn't always work on integers and strings [on]
+.SS "Possible Errors:"
+.HP
+\fB\-r\fR, \fB\-\-returnvalues\fR check consistent return values [on]
+.HP
+\fB\-C\fR, \fB\-\-implicitreturns\fR check if using implict and explicit return values [on]
 .TP
-.B
-\fB-O\fP, \fB--objattrs\fP
+\fB\-O\fR, \fB\-\-objattrs\fR
 check that attributes of objects exist [on]
 .TP
-.B
-\fB-7\fP, \fB--slots\fP
+\fB\-7\fR, \fB\-\-slots\fR
 various warnings about incorrect usage of __slots__ [on]
 .TP
-.B
-\fB-3\fP, \fB--properties\fP
+\fB\-3\fR, \fB\-\-properties\fR
 using properties with classic classes [on]
 .TP
-.B
-\fB--emptyslots\fP
+\fB\-\-emptyslots\fR
 check if __slots__ is empty [on]
 .TP
-.B
-\fB-D\fP, \fB--intdivide\fP
+\fB\-D\fR, \fB\-\-intdivide\fR
 check if using integer division [on]
 .TP
-.B
-\fB-w\fP, \fB--shadow\fP
+\fB\-w\fR, \fB\-\-shadow\fR
 check if local variable shadows a global [on]
-.PP
-Security:
+.HP
+\fB\-s\fR, \fB\-\-shadowbuiltin\fR check if a variable shadows a builtin [on]
+.SS "Security:"
 .TP
-.B
-\fB--input\fP
-check if \fBinput\fP() is used [on]
+\fB\-\-input\fR
+check if input() is used [on]
 .TP
-.B
-\fB-6\fP, \fB--exec\fP
+\fB\-6\fR, \fB\-\-exec\fR
 check if the exec statement is used [off]
-.PP
-Suppressions:
+.SS "Suppressions:"
 .TP
-.B
-\fB-q\fP, \fB--stdlib\fP
+\fB\-q\fR, \fB\-\-stdlib\fR
 ignore warnings from files under standard library [off]
 .TP
-.B
-\fB-b\fP, \fB--blacklist\fP
+\fB\-b\fR, \fB\-\-blacklist\fR
 ignore warnings from the list of modules
 [['Tkinter', 'wxPython', 'gtk', 'GTK', 'GDK']]
 .TP
-.B
-\fB-Z\fP, \fB--varlist\fP
+\fB\-Z\fR, \fB\-\-varlist\fR
 ignore global variables not used if name is one of these values
-[['__all__', '__version__', '__copyright__']]
+[['__version__', '__warningregistry__', '__all__', '__credits__', '__test__', '__author__', '__email__', '__revision__', '__id__', '__copyright__', '__license__', '__date__']]
 .TP
-.B
-\fB-E\fP, \fB--unusednames\fP
+\fB\-E\fR, \fB\-\-unusednames\fR
 ignore unused locals/arguments if name is one of these values
 [['_', 'empty', 'unused', 'dummy']]
-.RS
 .TP
-.B
-\fB--deprecated\fP
+\fB\-\-deprecated\fR
 ignore use of deprecated modules/functions [on]
-.RE
-.PP
-Complexity:
+.SS "Complexity:"
 .TP
-.B
-\fB-L\fP, \fB--maxlines\fP
+\fB\-L\fR, \fB\-\-maxlines\fR
 maximum lines in a function [200]
 .TP
-.B
-\fB-B\fP, \fB--maxbranches\fP
+\fB\-B\fR, \fB\-\-maxbranches\fR
 maximum branches in a function [50]
 .TP
-.B
-\fB-R\fP, \fB--maxreturns\fP
+\fB\-R\fR, \fB\-\-maxreturns\fR
 maximum returns in a function [10]
 .TP
-.B
-\fB-J\fP, \fB--maxargs\fP
+\fB\-J\fR, \fB\-\-maxargs\fR
 maximum # of arguments to a function [10]
 .TP
-.B
-\fB-K\fP, \fB--maxlocals\fP
+\fB\-K\fR, \fB\-\-maxlocals\fR
 maximum # of locals in a function [40]
 .TP
-.B
-\fB-5\fP, \fB--maxrefs\fP
+\fB\-5\fR, \fB\-\-maxrefs\fR
 maximum # of identifier references (Law of Demeter) [5]
 .TP
-.B
-\fB-m\fP, \fB--moduledoc\fP
-no module doc strings [on]
+\fB\-m\fR, \fB\-\-moduledoc\fR
+no module doc strings [off]
 .TP
-.B
-\fB-c\fP, \fB--classdoc\fP
-no class doc strings [on]
+\fB\-c\fR, \fB\-\-classdoc\fR
+no class doc strings [off]
 .TP
-.B
-\fB-f\fP, \fB--funcdoc\fP
+\fB\-f\fR, \fB\-\-funcdoc\fR
 no function/method doc strings [off]
-.PP
-Debug:
+.SS "Debug:"
 .TP
-.B
-\fB--rcfile\fP
+\fB\-\-rcfile\fR
 print a .pycheckrc file generated from command line args
 .TP
-.B
-\fB-P\fP, \fB--printparse\fP
+\fB\-P\fR, \fB\-\-printparse\fR
 print internal checker parse structures [off]
 .TP
-.B
-\fB-d\fP, \fB--debug\fP
+\fB\-d\fR, \fB\-\-debug\fR
 turn on debugging for checker [off]
 .TP
-.B
-\fB-Q\fP, \fB--quiet\fP
-turn off all output except warnings
+\fB\-Q\fR, \fB\-\-quiet\fR
+turn off all output except warnings [off]
 .TP
-.B
-\fB-V\fP, \fB--version\fP
+\fB\-V\fR, \fB\-\-version\fR
 print the version of PyChecker and exit
-.SH SEE ALSO
-\fBpython\fP(1)
 .SH AUTHOR
+Pychecker was written by Neal Norwitz and Eric C. Newton. Other contributors are listed in 
+.B /usr/share/doc/pychecker/MAINTAINERS
+
 This manual page was written by Fredrik Steen <[EMAIL PROTECTED]> for
 the Debian GNU/Linux system (but may be used by others).  It has been
 subsequently modified by Kenneth J. Pronovici <[EMAIL PROTECTED]>.
+.SH "SEE ALSO"
+\fBpython\fP(1)
 
+Running
+.B
+pychecker --help
+may provide more complete documentation of program options. 
+The pychecker web page at
+.B <http://pychecker.sourceforge.net>
+contains some guidance on using the program.
--no-info
[NAME]
\fBpychecker \fP- program to check python scripts for common mistakes
[SYNOPSIS]
.nf
.fam C
\fBpychecker\fP [\fIoptions\fP] files\.\.\.
.fam T
.fi
[DESCRIPTION]
This manual page documents briefly the \fBpychecker\fP command. It was written
for the Debian GNU/Linux distribution because the original program does not
have a manual page.
.PP
\fBpychecker\fP is a program that finds common bugs in python
source code. It finds problems that are typically caught by a compiler for
less dynamic languages, like C and C++. Because of the dynamic nature of
python, some warnings may be incorrect; however, spurious warnings should be
fairly infrequent.
.PP
\fBpychecker\fP works in a combination of ways.
First, it imports each module. If there is an import error, the module
cannot be processed. The import provides some basic information about the 
module.
The code for each function, class, and method is checked for possible
problems.
.SH CHOICE OF PYTHON VERSION
.PP
By default, the /usr/bin/pychecker script executes pychecker using the default
Python interpreter in /usr/bin/python.  Some users may want to run pychecker
with a different Python interpreter.  To accomodate this, the
 /usr/bin/pychecker script supports the use of $PYTHONVER on the command-line,
i.e.
.TP
.B
PYTHONVER=2.3 pychecker file.py
.PP
If $PYTHONVER is set, /usr/bin/pychecker will attempt to execute pychecker
using /usr/bin/python$PYTHONVER instead of /usr/bin/python.  
.PP
Note, however, that this will only work for versions of the python interpreter
supported by the current Debian Python infrastructure, not for any arbitrary
Python interpreter installed in /usr/bin.
.SH OPTIONS
Long \fIoptions\fP can be preceded with no- to turn off (e.g., no-namedargs)
.PP
[SEE ALSO]
\fBpython\fP(1)
Running
.B
pychecker --help
may provide more complete documentation of program options. 
The pychecker web page at
.B <http://pychecker.sourceforge.net>
contains some guidance on using the program.

[AUTHOR]
Pychecker was written by Neal Norwitz and Eric C. Newton. Other contributors 
are listed in 

.B /usr/share/doc/pychecker/MAINTAINERS
This manual page was written by Fredrik Steen <[EMAIL PROTECTED]> for
the Debian GNU/Linux system (but may be used by others).  It has been
subsequently modified by Kenneth J. Pronovici <[EMAIL PROTECTED]>.

Reply via email to