[Python-projects] pylint global warnings
Daniel(原志)
dlin.tw at gmail.com
Tue Apr 15 09:04:52 CEST 2008
So, if I use global variables, it will always show warning.
Does that means pylint recommends don't use global variable. And just using
the parameter passing method between functions?
On Tue, Apr 15, 2008 at 11:48:47AM +0800, Daniel(原志) wrote:
> > Hi, Sylvain,
>
> Hi,
>
> first please use the python-projects at logilab.org mailing-list for pylint
> related discussion (Cc'ed).
>
> > I'm trying to use pylint. But I found it is difficult to remove all
> > warnings.
>
> you usually don't have to expect 0 warnings when pylint is running on
> your program. It may flag a lot of things which are not problems.
>
> > I have a program need to parsing many command line options.
> > eg.
> > my_test.py -a -b -c -d -e -f -h -i -j -k -l -m -n -o -p -q foo.file
> >
> > I need some global variable to assign some flag.
> > If I put all these variable into a main(), the pylint warning me it
> contain
> > too many variable in local function.
> > If I put in global, pylint warning me discourage modify global variable
> in
> > function.
> >
> > I have no idea how to do it. Could you give me some hint?
>
> put your flags into a dictionary?
>
> --
> Sylvain Thénault LOGILAB, Paris (France)
> Formations Python, Zope, Plone, Debian: http://www.logilab.fr/formations
> Développement logiciel sur mesure: http://www.logilab.fr/services
> Python et calcul scientifique: http://www.logilab.fr/science
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.logilab.org/pipermail/python-projects/attachments/20080415/7f9bef50/attachment.htm
More information about the Python-Projects
mailing list