| Total Complexity | 9 | 
| Total Lines | 69 | 
| Duplicated Lines | 0 % | 
| 1 | #! /usr/bin/env python  | 
            ||
| 16 | class Bond(rdkit.Chem.rdchem.Bond, ChemicalObject):  | 
            ||
| 17 | |||
| 18 | """  | 
            ||
| 19 | Class representing a chemical bond in scikit-chem.  | 
            ||
| 20 | |||
| 21 | """  | 
            ||
| 22 | |||
| 23 | @property  | 
            ||
| 24 | def order(self):  | 
            ||
| 25 | |||
| 26 | """  | 
            ||
| 27 | The order of the bond.  | 
            ||
| 28 | |||
| 29 | Parameters  | 
            ||
| 30 | ----------  | 
            ||
| 31 | |||
| 32 | None  | 
            ||
| 33 | |||
| 34 | Returns  | 
            ||
| 35 | -------  | 
            ||
| 36 | |||
| 37 | bond :int  | 
            ||
| 38 | |||
| 39 | """  | 
            ||
| 40 | |||
| 41 | return self.GetBondTypeAsDouble()  | 
            ||
| 42 | |||
| 43 | @order.setter  | 
            ||
| 44 | def order(self, value):  | 
            ||
| 45 | |||
| 46 | """ Set the order of the bond. Not implemented."""  | 
            ||
| 47 | |||
| 48 | raise NotImplementedError  | 
            ||
| 49 | |||
| 50 | @property  | 
            ||
| 51 | def atoms(self):  | 
            ||
| 52 | |||
| 53 | """ Return an iterable of the atoms involved in the bond. """  | 
            ||
| 54 | |||
| 55 | return [Atom.from_super(self.GetBeginAtom()), Atom.from_super(self.GetEndAtom())]  | 
            ||
| 56 | |||
| 57 | @atoms.setter  | 
            ||
| 58 | def atoms(self, value):  | 
            ||
| 59 | |||
| 60 | """ Set the atoms of the molecule. Not implemented. """  | 
            ||
| 61 | |||
| 62 | raise NotImplementedError  | 
            ||
| 63 | |||
| 64 | def draw(self):  | 
            ||
| 65 | |||
| 66 | """ Draw the bond inline. """  | 
            ||
| 67 | |||
| 68 |         return '{}{}{}'.format(self.atoms[0].element, \ | 
            ||
| 69 | '-' if self.order == 1 else self.GetSmarts(), \  | 
            ||
| 70 | self.atoms[0].element)  | 
            ||
| 71 | |||
| 72 | def to_dict(self):  | 
            ||
| 73 | |||
| 74 | """ Convert to a dictionary representation. """  | 
            ||
| 75 | |||
| 76 |         return {"b": self.GetBeginAtomIdx(), "e": self.GetEndAtomIdx(), "o": self.order} | 
            ||
| 77 | |||
| 78 | def __repr__(self):  | 
            ||
| 79 |         return '<{klass} type="{bond}" at {address}>'.format(klass=self.__class__.__name__, \ | 
            ||
| 80 | bond=self.draw(), \  | 
            ||
| 81 | address=hex(id(self)))  | 
            ||
| 82 | |||
| 83 | def __str__(self):  | 
            ||
| 84 | return self.draw()  | 
            ||
| 85 | 
This can be caused by one of the following:
1. Missing Dependencies
This error could indicate a configuration issue of Pylint. Make sure that your libraries are available by adding the necessary commands.
2. Missing __init__.py files
This error could also result from missing
__init__.pyfiles in your module folders. Make sure that you place one file in each sub-folder.