[Biopython-dev] [Bug 3013] import warnings missing in Bio/PDB/MMCIF2Dict.py

bugzilla-daemon at portal.open-bio.org bugzilla-daemon at portal.open-bio.org
Sat Feb 20 13:40:59 EST 2010


http://bugzilla.open-bio.org/show_bug.cgi?id=3013





------- Comment #3 from eric.talevich at gmail.com  2010-02-20 13:40 EST -------
(In reply to comment #2)
> Can pychecker be of any use for detecting such minor bugs? It might be too
> much, I guess.
> 

I don't know about PyChecker, but PyLint will catch import errors and
uninitialized variables like this. For example, I just tried "pylint -e
Bio/PDB/*.py" to a branch that didn't have this fix in it yet, and it flagged
this bug:

E: 79:MMCIF2Dict._make_mmcif_dict: Undefined variable 'warnings'
E: 91:MMCIF2Dict._make_mmcif_dict: Undefined variable 'warnings'
E:107:MMCIF2Dict._make_mmcif_dict: Undefined variable 'warnings'


While I'm at it, here are the other errors in Bio.PDB that pylint caught in a
freshly updated master branch:


************* Module Chain
E: 79:Chain.__delitem__: Class 'Entity' has no '__delitem__' member

************* Module DSSP
E:101:make_dssp_dict: function already defined line 8
E:139:DSSP: class already defined line 8

************* Module Entity
E: 56:Entity.get_level: Instance of 'Entity' has no 'level' member

************* Module FragmentMapper
E:137:Fragment.add_residue: Undefined variable 'PDBException'
E:191:_make_fragment_list: Undefined variable 'PDBException'
E:193:_make_fragment_list: Undefined variable 'PDBException'
E:226:FragmentMapper: class already defined line 10
E:250:FragmentMapper.__init__: Undefined variable 'PDBException'

************* Module HSExposure
E: 67:_AbstractHSExposure.__init__: Instance of '_AbstractHSExposure' has no
'_get_cb' member
E:131:HSExposureCA: class already defined line 9
E:222:HSExposureCB: class already defined line 9
E:257:ExposureCN: class already defined line 9

************* Module MMCIF2Dict
E:  8: No name 'MMCIFlex' in module 'Bio.PDB.mmCIF'
E: 31:MMCIF2Dict.__init__: Module 'Bio.PDB.mmCIF' has no 'MMCIFlex' member
E: 33:MMCIF2Dict.__init__: Module 'Bio.PDB.mmCIF' has no 'MMCIFlex' member
E: 44:MMCIF2Dict._make_mmcif_dict: Module 'Bio.PDB.mmCIF' has no 'MMCIFlex'
member

************* Module NACCESS
E:183: Instance of 'NACCESS' has no 'get_iterator' member

************* Module PDBParser
E:159:PDBParser._parse_coordinates: Undefined variable 'PDBContructionError'

************* Module Polypeptide
E:276:_PPBuilder.build_peptides: Instance of '_PPBuilder' has no
'_is_connected' member

************* Module ResidueDepth
E: 65:get_surface: function already defined line 11
E:123:ResidueDepth: class already defined line 11

************* Module StructureAlignment
E: 14:StructureAlignment: class already defined line 6



-- 
Configure bugmail: http://bugzilla.open-bio.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.


More information about the Biopython-dev mailing list