[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [virt-tools-list] [PATCH-v6.1 4/5] add option for snapshot-id suffix to __version__

On 04/17/2013 03:52 PM, Gene Czarcinski wrote:
> On 04/17/2013 03:36 PM, Cole Robinson wrote:
>> Thanks Gene, I applied this series.
>> There's still a little weirdness here though, subclassing sdist_auto but
>> calling sdist.finalize_options, etc. I pushed an addon commit that fixed that
>> up, and fixed up some 'python setup.py pylint' output as well. rpm building
>> with and without --snapshot seem to work fine, but please confirm.
> It is quite possible that I don't understand all of the class/subclass
> inheriting.  Since sdist_auto did not have a finalize_options but sdist did
> ... leaning all the time.
> I have a "large" updating coming "real soon now" which does more updating for
> networking.  I have a lot of updates to createnet.py. I saw the updates for
> pylint but need some guidance as to when "ignore = src" should be added and
> when it should not ... I am not that well versed in pylint.  From the current
> update, "ignore = src" seems to be added only to the methods handling the
> check-box changes.

For pylint, just run 'python setup.py pylint'. Right now for me on F18 it's
quiet, but I needed to pull down some newish pylint bits and a small change to
make it completely quiet (these are pylint bugs):

sudo wget
-O /usr/lib/python2.7/site-packages/logilab/astng/brain/py2stdlib.py

The 'ignore = FOO' bit is to supress warnings from pylint about unused
variables. It's a bit heavy handed, but unused variable warnings catch real
bugs and help keep the code clean. Since a lot of UI callbacks will pass data
you don't need, it's quite common there. You can just name the variable
upfront as 'ignore' in the function definition, but I slightly prefer giving
the variable a descriptive name, then explicitly doing ignore =, since
otherwise you have no idea what the ignore'd data is.

If in the process of developing you hit an error from pylint you don't
understand, pylint --list-msgs may have more info. There are also some cases
where it's okay to tell pylint to ignore a statement, but they should be rare
and should be dealt with on a case by case basis.

- Cole

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]