diff --git a/opencadd/databases/klifs/core.py b/opencadd/databases/klifs/core.py index c3def060..59650479 100644 --- a/opencadd/databases/klifs/core.py +++ b/opencadd/databases/klifs/core.py @@ -1321,7 +1321,6 @@ class CoordinatesProvider(BaseProvider): """ def __init__(self, *args, **kwargs): - self.options = { "entities": ["complex", "ligand", "pocket", "protein", "water"], "extensions": ["mol2", "pdb"], diff --git a/opencadd/databases/klifs/local.py b/opencadd/databases/klifs/local.py index e38f5cea..1c5d2b7d 100644 --- a/opencadd/databases/klifs/local.py +++ b/opencadd/databases/klifs/local.py @@ -52,7 +52,6 @@ class LocalInitializer: """ def __init__(self, database, path_to_klifs_download, *args, **kwargs): - self._database = database self._path_to_klifs_download = path_to_klifs_download @@ -70,7 +69,6 @@ class _LocalDatabaseGenerator: """ def __init__(self): - self.path_to_klifs_download = None @classmethod @@ -317,7 +315,6 @@ def _add_filepaths(klifs_metadata): filepaths = [] for _, row in klifs_metadata.iterrows(): - # Depending on whether alternate model and chain ID is given build file path: filepath = metadata_to_filepath( ".", @@ -394,7 +391,6 @@ class Kinases(LocalInitializer, KinasesProvider): """ def all_kinase_groups(self): - # Get local database kinase_groups = self._database.copy() # Standardize DataFrame @@ -404,7 +400,6 @@ def all_kinase_groups(self): return kinase_groups def all_kinase_families(self, groups=None): - # Get local database and select rows kinase_families = self._database.copy() groups = self._ensure_list(groups) @@ -417,7 +412,6 @@ def all_kinase_families(self, groups=None): return kinase_families def all_kinases(self, groups=None, families=None, species=None): - # Get local database and select rows kinases = self._database.copy() groups = self._ensure_list(groups) @@ -433,7 +427,6 @@ def all_kinases(self, groups=None, families=None, species=None): return kinases def by_kinase_klifs_id(self, kinase_klifs_ids): - kinase_klifs_ids = self._ensure_list(kinase_klifs_ids) # Get local database and select rows kinases = self._database.copy() @@ -443,7 +436,6 @@ def by_kinase_klifs_id(self, kinase_klifs_ids): return kinases def by_kinase_name(self, kinase_names, species=None): - kinase_names = self._ensure_list(kinase_names) # Get local database and select rows kinases = self._database.copy() @@ -469,7 +461,6 @@ class Ligands(LocalInitializer, LigandsProvider): """ def all_ligands(self): - # Get local database ligands = self._database.copy() # Standardize DataFrame @@ -477,7 +468,6 @@ def all_ligands(self): return ligands def by_kinase_klifs_id(self, kinase_klifs_ids): - kinase_klifs_ids = self._ensure_list(kinase_klifs_ids) # Get local database and select rows ligands = self._database.copy() @@ -498,7 +488,6 @@ def by_kinase_klifs_id(self, kinase_klifs_ids): return ligands def by_kinase_name(self, kinase_names): - kinase_names = self._ensure_list(kinase_names) # Get local database and select rows ligands = self._database.copy() @@ -532,7 +521,6 @@ def by_kinase_name(self, kinase_names): return ligands def by_ligand_expo_id(self, ligand_expo_ids): - ligand_expo_ids = self._ensure_list(ligand_expo_ids) # Get local database and select rows ligands = self._database.copy() @@ -553,7 +541,6 @@ class Structures(LocalInitializer, StructuresProvider): """ def all_structures(self): - # Get local database structures = self._database.copy() # Standardize DataFrame @@ -564,7 +551,6 @@ def all_structures(self): return structures def by_structure_klifs_id(self, structure_klifs_ids): - structure_klifs_ids = self._ensure_list(structure_klifs_ids) # Get local database and select rows structures = self._database.copy() @@ -582,7 +568,6 @@ def by_structure_klifs_id(self, structure_klifs_ids): return structures def by_kinase_klifs_id(self, kinase_klifs_ids): - kinase_klifs_ids = self._ensure_list(kinase_klifs_ids) # Get local database and select rows structures = self._database.copy() @@ -597,7 +582,6 @@ def by_kinase_klifs_id(self, kinase_klifs_ids): def by_structure_pdb_id( self, structure_pdb_ids, structure_alternate_model=None, structure_chain=None ): - structure_pdb_ids = self._ensure_list(structure_pdb_ids) # Get local database and select rows structures = self._database.copy() @@ -615,7 +599,6 @@ def by_structure_pdb_id( return structures def by_ligand_expo_id(self, ligand_expo_ids): - ligand_expo_ids = self._ensure_list(ligand_expo_ids) # Get local database and select rows structures = self._database.copy() @@ -628,7 +611,6 @@ def by_ligand_expo_id(self, ligand_expo_ids): return structures def by_kinase_name(self, kinase_names): - kinase_names = self._ensure_list(kinase_names) # Get local database and select rows (search in all available kinase names) structures = self._database.copy() @@ -662,7 +644,6 @@ class Interactions(LocalInitializer, InteractionsProvider): """ def all_interactions(self): - # Get local database interactions = self._database.copy() # Standardize DataFrame @@ -673,7 +654,6 @@ def all_interactions(self): return interactions def by_structure_klifs_id(self, structure_klifs_ids): - structure_klifs_ids = self._ensure_list(structure_klifs_ids) # Get local database and select rows interactions = self._database.copy() @@ -686,7 +666,6 @@ def by_structure_klifs_id(self, structure_klifs_ids): return interactions def by_kinase_klifs_id(self, kinase_klifs_ids): - kinase_klifs_ids = self._ensure_list(kinase_klifs_ids) # Get local database and select rows interactions = self._database.copy() @@ -713,7 +692,6 @@ class Pockets(LocalInitializer, PocketsProvider): """ def by_structure_klifs_id(self, structure_klifs_id, extension="mol2"): # pylint: disable=W0221 - # Get kinase pocket from structure ID structures_local = Structures(self._database, self._path_to_klifs_download) structure = structures_local.by_structure_klifs_id(structure_klifs_id).squeeze() @@ -786,7 +764,6 @@ class Coordinates(LocalInitializer, CoordinatesProvider): def to_text( self, structure_klifs_id_or_filepath, entity="complex", extension="mol2" ): # pylint: disable=W0221 - filepath = self._to_filepath(structure_klifs_id_or_filepath, entity, extension) with open(filepath, "r") as f: text = f.read() @@ -795,7 +772,6 @@ def to_text( def to_dataframe( self, structure_klifs_id_or_filepath, entity="complex", extension="mol2" ): # pylint: disable=W0221 - filepath = self._to_filepath(structure_klifs_id_or_filepath, entity, extension) dataframe = DataFrame.from_file(filepath) dataframe = self._add_residue_klifs_ids(dataframe, filepath) @@ -804,7 +780,6 @@ def to_dataframe( def to_rdkit( self, structure_klifs_id_or_filepath, entity="complex", extension="mol2", compute2d=True ): # pylint: disable=W0221 - filepath = self._to_filepath(structure_klifs_id_or_filepath, entity, extension) rdkit_mol = Rdkit.from_file(filepath, compute2d) return rdkit_mol @@ -893,7 +868,6 @@ class Drugs(LocalInitializer, DrugsProvider): """ def all_drugs(self): - raise NotImplementedError( "Information on drugs is not available locally! Please use a remote session." ) @@ -907,13 +881,11 @@ class StructureConformations(LocalInitializer, StructureConformationsProvider): """ def all_conformations(self): - raise NotImplementedError( "Information on conformations is not available locally! Please use a remote session." ) def by_structure_klifs_id(self, structure_klifs_id): - raise NotImplementedError( "Information on conformations is not available locally! Please use a remote session." ) @@ -927,7 +899,6 @@ class StructureModifiedResidues(LocalInitializer, StructureModifiedResiduesProvi """ def by_structure_klifs_id(self, structure_klifs_id): - raise NotImplementedError( "Information on modified residues is not available locally! Please use a remote session." ) diff --git a/opencadd/databases/klifs/remote.py b/opencadd/databases/klifs/remote.py index b8e1450d..5eb4f832 100644 --- a/opencadd/databases/klifs/remote.py +++ b/opencadd/databases/klifs/remote.py @@ -65,7 +65,6 @@ class RemoteInitializer: """ def __init__(self, client, *args, **kwargs): - self._client = client @@ -77,7 +76,6 @@ class Kinases(RemoteInitializer, KinasesProvider): """ def all_kinase_groups(self): - # Use KLIFS API result = self._client.Information.get_kinase_groups().response().result # Convert list to DataFrame (1 column) @@ -87,7 +85,6 @@ def all_kinase_groups(self): return kinase_groups def all_kinase_families(self, groups=None): - groups = self._ensure_list(groups) # Use KLIFS API result = ( @@ -100,7 +97,6 @@ def all_kinase_families(self, groups=None): return kinase_families def all_kinases(self, groups=None, families=None, species=None): - groups = self._ensure_list(groups) families = self._ensure_list(families) # Use KLIFS API @@ -122,7 +118,6 @@ def all_kinases(self, groups=None, families=None, species=None): return kinases def by_kinase_klifs_id(self, kinase_klifs_ids): - kinase_klifs_ids = self._ensure_list(kinase_klifs_ids) # Use KLIFS API result = ( @@ -139,7 +134,6 @@ def by_kinase_klifs_id(self, kinase_klifs_ids): return kinases def by_kinase_name(self, kinase_names, species=None): - kinase_names = self._ensure_list(kinase_names) # Use KLIFS API result = ( @@ -164,7 +158,6 @@ class Ligands(RemoteInitializer, LigandsProvider): """ def all_ligands(self): - # Use KLIFS API: Get all kinase KLIFS IDs kinases_remote = Kinases(self._client) kinases = kinases_remote.all_kinases() @@ -182,7 +175,6 @@ def all_ligands(self): return ligands def by_kinase_klifs_id(self, kinase_klifs_ids): - # Use KLIFS API (send requests iteratively) ligands = self._multiple_remote_requests(self._by_kinase_klifs_id, kinase_klifs_ids) # Standardize DataFrame @@ -223,7 +215,6 @@ def _by_kinase_klifs_id(self, kinase_klifs_id): return ligands def by_kinase_name(self, kinase_names): - kinase_names = self._ensure_list(kinase_names) # Use KLIFS API: Get kinase KLIFS IDs for input kinase names (remotely) # Note: One kinase name can be linked to multiple kinase KLIFS IDs (due to multiple species) @@ -252,7 +243,6 @@ def by_kinase_name(self, kinase_names): return ligands def by_ligand_klifs_id(self, ligand_klifs_ids): - ligand_klifs_ids = self._ensure_list(ligand_klifs_ids) # Use KLIFS API: Get all ligands ligands = self.all_ligands() @@ -265,7 +255,6 @@ def by_ligand_klifs_id(self, ligand_klifs_ids): return ligands def by_ligand_expo_id(self, ligand_expo_ids): - ligand_expo_ids = self._ensure_list(ligand_expo_ids) # Use KLIFS API: Get all ligands ligands = self.all_ligands() @@ -286,7 +275,6 @@ class Structures(RemoteInitializer, StructuresProvider): """ def all_structures(self): - # Use KLIFS API: Get all kinase KLIFS IDs kinases_remote = Kinases(self._client) kinases = kinases_remote.all_kinases() @@ -302,7 +290,6 @@ def all_structures(self): return structures def by_structure_klifs_id(self, structure_klifs_ids): - structure_klifs_ids = self._ensure_list(structure_klifs_ids) # Use KLIFS API result = ( @@ -321,7 +308,6 @@ def by_structure_klifs_id(self, structure_klifs_ids): return structures def by_ligand_klifs_id(self, ligand_klifs_ids): - ligand_klifs_ids = self._ensure_list(ligand_klifs_ids) # Use KLIFS API: Get all structures structures = self.all_structures() @@ -336,7 +322,6 @@ def by_ligand_klifs_id(self, ligand_klifs_ids): return structures def by_kinase_klifs_id(self, kinase_klifs_ids): - kinase_klifs_ids = self._ensure_list(kinase_klifs_ids) # Use KLIFS API result = ( @@ -357,7 +342,6 @@ def by_kinase_klifs_id(self, kinase_klifs_ids): def by_structure_pdb_id( self, structure_pdb_ids, structure_alternate_model=None, structure_chain=None ): - structure_pdb_ids = self._ensure_list(structure_pdb_ids) # Use KLIFS API result = ( @@ -381,7 +365,6 @@ def by_structure_pdb_id( return structures def by_ligand_expo_id(self, ligand_expo_ids): - ligand_expo_ids = self._ensure_list(ligand_expo_ids) # Use KLIFS API: Get all structures structures = self.all_structures() @@ -396,7 +379,6 @@ def by_ligand_expo_id(self, ligand_expo_ids): return structures def by_kinase_name(self, kinase_names): - kinase_names = self._ensure_list(kinase_names) # Use KLIFS API: Get all structures structures = self.all_structures() @@ -419,7 +401,6 @@ class Bioactivities(RemoteInitializer, BioactivitiesProvider): """ def all_bioactivities(self, _top_n=None): - # Use KLIFS API: Get all kinase KLIFS IDs ligands_remote = Ligands(self._client) ligands = ligands_remote.all_ligands() @@ -441,7 +422,6 @@ def all_bioactivities(self, _top_n=None): return bioactivities def by_kinase_klifs_id(self, kinase_klifs_ids): - kinase_klifs_ids = self._ensure_list(kinase_klifs_ids) # Use KLIFS API: Get all kinase KLIFS IDs ligands_remote = Ligands(self._client) @@ -458,7 +438,6 @@ def by_kinase_klifs_id(self, kinase_klifs_ids): return bioactivities def by_ligand_klifs_id(self, ligand_klifs_ids): - # Use KLIFS API (send requests iteratively) bioactivities = self._multiple_remote_requests(self._by_ligand_klifs_id, ligand_klifs_ids) # Standardize DataFrame @@ -470,7 +449,6 @@ def by_ligand_klifs_id(self, ligand_klifs_ids): return bioactivities def by_ligand_expo_id(self, ligand_expo_id): - # Use KLIFS API (send requests iteratively) bioactivities = self._multiple_remote_requests(self._by_ligand_expo_id, ligand_expo_id) # Standardize DataFrame @@ -557,7 +535,6 @@ class Interactions(RemoteInitializer, InteractionsProvider): @property def interaction_types(self): - # Use KLIFS API result = self._client.Interactions.get_interactions_get_types().response().result # Convert list of ABC objects to DataFrame @@ -571,7 +548,6 @@ def interaction_types(self): return interaction_types def all_interactions(self): - # Use KLIFS API: Get all structure KLIFS IDs structures_remote = Structures(self._client) structures = structures_remote.all_structures() @@ -587,7 +563,6 @@ def all_interactions(self): return interactions def by_structure_klifs_id(self, structure_klifs_ids): - structure_klifs_ids = self._ensure_list(structure_klifs_ids) # Use KLIFS API result = ( @@ -606,7 +581,6 @@ def by_structure_klifs_id(self, structure_klifs_ids): return interactions def by_ligand_klifs_id(self, ligand_klifs_ids): - ligand_klifs_ids = self._ensure_list(ligand_klifs_ids) # Use KLIFS API: Get structure KLIFS IDs from ligand KLIFS IDs structures_remote = Structures(self._client) @@ -623,7 +597,6 @@ def by_ligand_klifs_id(self, ligand_klifs_ids): return interactions def by_kinase_klifs_id(self, kinase_klifs_ids): - kinase_klifs_ids = self._ensure_list(kinase_klifs_ids) # Use KLIFS API: Get structure KLIFS IDs from ligand KLIFS IDs structures_remote = Structures(self._client) @@ -648,7 +621,6 @@ class Pockets(RemoteInitializer, PocketsProvider): """ def by_structure_klifs_id(self, structure_klifs_id): - # Use KLIFS API result = ( self._client.Interactions.get_interactions_match_residues( @@ -677,7 +649,6 @@ class Coordinates(RemoteInitializer, CoordinatesProvider): """ def to_text(self, structure_klifs_id, entity="complex", extension="mol2"): - self._raise_invalid_extension(extension) if entity == "complex" and extension == "mol2": @@ -721,14 +692,12 @@ def to_text(self, structure_klifs_id, entity="complex", extension="mol2"): raise ValueError(f"Data could not be fetched.") def to_dataframe(self, structure_klifs_id, entity="complex", extension="mol2"): - text = self.to_text(structure_klifs_id, entity, extension) dataframe = DataFrame.from_text(text, extension) dataframe = self._add_residue_klifs_ids(dataframe, structure_klifs_id) return dataframe def to_rdkit(self, structure_klifs_id, entity="complex", extension="mol2", compute2d=True): - text = self.to_text(structure_klifs_id, entity, extension) rdkit_mol = Rdkit.from_text(text, extension, compute2d) return rdkit_mol @@ -882,7 +851,6 @@ class Drugs(RemoteInitializer, DrugsProvider): """ def all_drugs(self): - # Use KLIFS API result = self._client.Ligands.get_drug_list().response().result # Convert list of ABC objects to DataFrame @@ -902,7 +870,6 @@ class StructureConformations(RemoteInitializer, StructureConformationsProvider): """ def all_conformations(self): - # Use KLIFS API: Get all structure KLIFS IDs structures_remote = Structures(self._client) structures = structures_remote.all_structures() @@ -918,7 +885,6 @@ def all_conformations(self): return conformations def by_structure_klifs_id(self, structure_klifs_ids): - structure_klifs_ids = self._ensure_list(structure_klifs_ids) # Use KLIFS API result = ( @@ -945,7 +911,6 @@ class StructureModifiedResidues(RemoteInitializer, StructureModifiedResiduesProv """ def by_structure_klifs_id(self, structure_klifs_id): - # Use KLIFS API result = ( self._client.Structures.get_structure_modified_residues( diff --git a/opencadd/databases/klifs/session.py b/opencadd/databases/klifs/session.py index 2f61c250..dad3d3f8 100644 --- a/opencadd/databases/klifs/session.py +++ b/opencadd/databases/klifs/session.py @@ -46,7 +46,6 @@ class Session: """ def __init__(self): - # Not None in local only self._path_to_klifs_download = None self._database = None diff --git a/opencadd/io/dataframe.py b/opencadd/io/dataframe.py index 736cc74c..abdda8c8 100644 --- a/opencadd/io/dataframe.py +++ b/opencadd/io/dataframe.py @@ -319,10 +319,8 @@ def _format_dataframe(cls, dataframe, verbose=False): dataframe_columns = DATAFRAME_COLUMNS["default"] # If default column names are missing, add empty columns - for (column_name, column_dtype) in dataframe_columns: - + for column_name, column_dtype in dataframe_columns: if column_name not in dataframe.columns: - if column_dtype == "string": dataframe.insert(len(dataframe.columns), column_name, None) elif column_dtype == "float32": diff --git a/opencadd/structure/pocket/base.py b/opencadd/structure/pocket/base.py index 05174654..6a818c49 100644 --- a/opencadd/structure/pocket/base.py +++ b/opencadd/structure/pocket/base.py @@ -18,7 +18,6 @@ class PocketBase: """ def __init__(self): - self.name = None self._residue_ids = None self._residue_ixs = None diff --git a/opencadd/structure/pocket/core.py b/opencadd/structure/pocket/core.py index 6895a5fd..4f45c335 100644 --- a/opencadd/structure/pocket/core.py +++ b/opencadd/structure/pocket/core.py @@ -56,7 +56,6 @@ class Pocket(PocketBase): """ def __init__(self): - self.name = None self.data = None self.center = None diff --git a/opencadd/structure/pocket/features/region.py b/opencadd/structure/pocket/features/region.py index b5a8868b..05f9081c 100644 --- a/opencadd/structure/pocket/features/region.py +++ b/opencadd/structure/pocket/features/region.py @@ -24,7 +24,6 @@ class Region: """ def __init__(self, name, residue_ids, residue_ixs=None, color="blue"): - self.name = name self.color = color self.residue_ids = residue_ids diff --git a/opencadd/structure/pocket/klifs.py b/opencadd/structure/pocket/klifs.py index 4fbc7b8c..5cc1f032 100644 --- a/opencadd/structure/pocket/klifs.py +++ b/opencadd/structure/pocket/klifs.py @@ -79,7 +79,6 @@ def from_structure_klifs_id( @staticmethod def add_klifs_regions(pocket, pocket_residues): - for (region, color), group in pocket_residues.groupby( ["residue.klifs_region", "residue.klifs_color"] ): @@ -93,7 +92,6 @@ def add_klifs_regions(pocket, pocket_residues): @staticmethod def add_klifs_subpockets(pocket, pocket_residues, subpockets): - # Map residue KLIFS IDs > residue ID if subpockets is not None: subpockets = pd.DataFrame(subpockets) diff --git a/opencadd/structure/pocket/viewer.py b/opencadd/structure/pocket/viewer.py index 3f75b9d1..f846e1b7 100644 --- a/opencadd/structure/pocket/viewer.py +++ b/opencadd/structure/pocket/viewer.py @@ -51,7 +51,6 @@ class PocketViewer: """ def __init__(self): - self.viewer = nglview.NGLWidget() self.viewer._remote_call("setSize", target="Widget", args=["1000px", "600px"]) self.pockets_residue_ngl_ixs = {} @@ -204,12 +203,10 @@ def _map_residue_ids_names_nglixs(self, pocket): residue_id2ix = dataframe[["residue.name", "residue.id"]].drop_duplicates() if pocket._extension == "mol2": - # Map residue names to nglview index (starting from 1) residue_id2ix["residue.ngl_ix"] = [str(i) for i in range(1, len(residue_id2ix) + 1)] else: - # In this case, residue ID and nglview index are the same residue_id2ix["residue.ngl_ix"] = [str(i) for i in residue_id2ix["residue.id"]] diff --git a/opencadd/structure/superposition/engines/mda.py b/opencadd/structure/superposition/engines/mda.py index 68045d39..3415dcfa 100644 --- a/opencadd/structure/superposition/engines/mda.py +++ b/opencadd/structure/superposition/engines/mda.py @@ -75,7 +75,6 @@ def __init__( superposition_weights=None, superposition_delta_mass_tolerance=0.1, ): - self.alignment_strategy = alignment_strategy.lower() if self.alignment_strategy == "global": self._align_local = False diff --git a/opencadd/structure/superposition/sequences.py b/opencadd/structure/superposition/sequences.py index 38ee0fe3..83c79ee1 100644 --- a/opencadd/structure/superposition/sequences.py +++ b/opencadd/structure/superposition/sequences.py @@ -12,7 +12,6 @@ def matrices(name): - """ A SubstitutionMatrix maps each possible pairing of a symbol of a first alphabet with a symbol of a second alphabet to a score (int) @@ -42,7 +41,6 @@ def matrices(name): def sequence_alignment(seq1: str, seq2: str, matrix: str, gap: int, local: bool = False) -> str: - """ Perform a global alignment, based on the Needleman-Wunsch algorithm diff --git a/opencadd/tests/databases/test_klifs_local_remote.py b/opencadd/tests/databases/test_klifs_local_remote.py index 09413a8a..e82c0ea1 100644 --- a/opencadd/tests/databases/test_klifs_local_remote.py +++ b/opencadd/tests/databases/test_klifs_local_remote.py @@ -212,7 +212,6 @@ def test_all_interactions(self): check_dataframe(result_local, FIELDS.oc_name_to_type("interactions")) def test_all_bioactivities(self): - """ Test request result for all kinases. """ diff --git a/opencadd/tests/databases/test_klifs_remote_parallelization.py b/opencadd/tests/databases/test_klifs_remote_parallelization.py index 479d779f..31a1abef 100644 --- a/opencadd/tests/databases/test_klifs_remote_parallelization.py +++ b/opencadd/tests/databases/test_klifs_remote_parallelization.py @@ -18,7 +18,6 @@ [(REMOTE, [111, 113], 2)], ) def test_remote_parallelization(klifs_session, structure_klifs_ids, n_cores): - pool = Pool(processes=n_cores) pool.starmap(_parallelize_klifs_session, zip(structure_klifs_ids, repeat(klifs_session))) diff --git a/opencadd/tests/structure/test_pocket_core.py b/opencadd/tests/structure/test_pocket_core.py index fc54dd30..b3ceb315 100644 --- a/opencadd/tests/structure/test_pocket_core.py +++ b/opencadd/tests/structure/test_pocket_core.py @@ -482,7 +482,6 @@ def test_center_and_ca_atoms( def test_format_residue_ids_and_ixs( self, residue_ids, residue_ixs, residue_ids_formatted, residue_ixs_formatted ): - pocket = Pocket() residue_ids, residue_ixs = pocket._format_residue_ids_and_ixs( residue_ids, residue_ixs, "text" diff --git a/opencadd/tests/structure/test_pocket_region.py b/opencadd/tests/structure/test_pocket_region.py index 40fb71c0..7174681e 100644 --- a/opencadd/tests/structure/test_pocket_region.py +++ b/opencadd/tests/structure/test_pocket_region.py @@ -18,7 +18,6 @@ class TestRegion: [("example", [1, 2], [10, 20], "blue")], ) def test_attributes_and_properties(self, name, residue_ids, residue_ixs, color): - region = Region(name, residue_ids, residue_ixs, color) assert region.name == name assert region.residue_ids == residue_ids diff --git a/opencadd/utils.py b/opencadd/utils.py index d9eae239..266616a4 100644 --- a/opencadd/utils.py +++ b/opencadd/utils.py @@ -44,7 +44,6 @@ def __init__(self, fmt="%(levelname)d: %(message)s", datefmt=None, style="%", ** super().__init__(fmt=fmt, datefmt=datefmt, style=style, **kwargs) def format(self, record): - # Save the original format configured by the user # when the logger formatter was instantiated format_orig = self._style._fmt