[Biopython-dev] pylint, was: Changes to the main repo

Peter Cock p.j.a.cock at googlemail.com
Thu Apr 1 09:45:29 UTC 2010


2010/3/23 Peter Cock <p.j.a.cock at googlemail.com>:
> Hi Taigo,
>
> This is looking much better after your fixes last night - just one left:
>
> $ pylint --disable-msg-cat=CRW --include-ids=y
> --disable-msg=E1101,E1103,E0102 -r n Bio.PopGen
> No config file found, using default configuration
> ************* Module Bio.PopGen.GenePop.Controller
> E0602: 41:_read_allele_freq_table: Undefined variable 'self'
>
> Note if I turn off those particular error messages which in other
> situations I had tentatively tagged as false positives, there could
> be a few more issues:
>
> $ pylint --disable-msg-cat=CRW --include-ids=y -r n Bio.PopGen
> ...

Again, looking much better after yesterday's work:

$ pylint --disable-msg-cat=CRW --include-ids=y -r n Bio.PopGen
No config file found, using default configuration
************* Module Bio.PopGen.GenePop.EasyController
E1101: 43:EasyController.test_hw_pop: Instance of 'GenePopController'
has no 'test_pop_hz_prob' member
************* Module Bio.PopGen.GenePop.FileParser
E1101:197:FileRecord.remove_population: Instance of 'FileRecord' has
no 'populations' member
E1101:206:FileRecord.remove_locus_by_position: Instance of
'FileRecord' has no 'populations' member

The EasyController issue looks fairly simple, there are three
test methods defined in Bio.PopGen.EasyPop.Controller
* test_pop_hz_deficiency
* test_pop_hz_excess
* test_pop_hw_prob

However, in Bio.PopGen.EasyPop.EasyController the method
test_hw_pop tries to call these three methods of the controller:
* test_pop_hz_deficiency
* test_pop_hz_excess
* test_pop_hz_prob

It looks like an hw/hz typo - but as you use hw in other contexts,
I am not 100% sure about this diagnosis.

The second set of errors are in Bio.PopGen.GenePop.FileParser
which is does look like self.populations is never defined. So again,
this looks like pylint has found a real issue.

Regards,

Peter



More information about the Biopython-dev mailing list