From 12da3f96783040df9406dd33a84e4a57d80f1c87 Mon Sep 17 00:00:00 2001 From: Chi Chen Date: Mon, 27 Jul 2020 13:58:04 -0700 Subject: [PATCH] fix test --- megnet/data/molecule.py | 4 ++-- pylintrc | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/megnet/data/molecule.py b/megnet/data/molecule.py index 818d677e0..9139e2dd2 100644 --- a/megnet/data/molecule.py +++ b/megnet/data/molecule.py @@ -357,7 +357,7 @@ def create_bond_feature(mol, bid: int, eid: int) -> Dict: return {"a_idx": bid, "b_idx": eid, "bond_type": 0, - "same_ring": same_ring, + "same_ring": bool(same_ring), "spatial_distance": a1.GetDistance(a2)} def get_pair_feature(self, mol, bid: int, @@ -390,7 +390,7 @@ def get_pair_feature(self, mol, bid: int, return {"a_idx": bid, "b_idx": eid, "bond_type": 4 if bond.IsAromatic() else bond.GetBondOrder(), - "same_ring": same_ring, + "same_ring": bool(same_ring), "spatial_distance": a1.GetDistance(a2)} @staticmethod diff --git a/pylintrc b/pylintrc index f7d3c95b8..9316dfb31 100644 --- a/pylintrc +++ b/pylintrc @@ -7,7 +7,7 @@ extension-pkg-whitelist=numpy, rdkit, pybel, openbabel # Add files or directories to the blacklist. They should be base names, not # paths. -ignore=R0201 +ignore= # Add files or directories matching the regex patterns to the blacklist. The # regex matches against base names, not paths. @@ -159,7 +159,8 @@ disable=print-statement, R0901, C0415, C0330, - C0302 + C0302, + R0201 # Enable the message, report, category or checker with the given id(s). You can # either give multiple identifier separated by comma (,) or put this option