Commit fdd970ea authored by VIGNESHinZONE's avatar VIGNESHinZONE
Browse files

Fixing mypy & Flake8

parent 198fc0bb
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -628,7 +628,8 @@ def compute_ring_normal(mol, ring_indices):
  return normal


def compute_all_pairs_shortest_path(mol) -> Dict[Tuple[int], Tuple[int]]:
def compute_all_pairs_shortest_path(
    mol) -> Dict[Tuple[int, int], Tuple[int, int]]:
  """Computes the All pair shortest between every pair of nodes
  in terms of Rdkit Atom indexes.

+0 −10
Original line number Diff line number Diff line
@@ -142,16 +142,6 @@ class TestGraphConvUtils(unittest.TestCase):
    one_hot = get_atom_total_degree_one_hot(atoms[3])
    assert one_hot == [0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0]

  def test_get_atom_total_degree_one_hot(self):
    atoms = self.mol.GetAtoms()
    assert atoms[0].GetSymbol() == "C"
    one_hot = get_atom_total_degree_one_hot(atoms[0])
    assert one_hot == [0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0]

    assert atoms[3].GetSymbol() == "O"
    one_hot = get_atom_total_degree_one_hot(atoms[3])
    assert one_hot == [0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0]

  def test_get_atom_implicit_valence_one_hot(self):
    atoms = self.mol.GetAtoms()
    assert atoms[0].GetSymbol() == "C"