From aa76908a092c64fb8a63cfef8ff4815abc1ffb74 Mon Sep 17 00:00:00 2001 From: john681611 Date: Thu, 14 Sep 2023 11:08:36 +0100 Subject: [PATCH] linting fixes --- application/cmd/cre_main.py | 3 ++- application/database/db.py | 1 - application/tests/db_test.py | 2 -- cre.py | 1 - 4 files changed, 2 insertions(+), 5 deletions(-) diff --git a/application/cmd/cre_main.py b/application/cmd/cre_main.py index abae29e2c..0c02f6bb6 100644 --- a/application/cmd/cre_main.py +++ b/application/cmd/cre_main.py @@ -533,9 +533,10 @@ def owasp_metadata_to_cre(meta_file: str): """ raise NotImplementedError("someone needs to work on this") + def populate_neo4j_db(cache: str): logger.info(f"Populating neo4j DB: Connecting to SQL DB") database = db_connect(path=cache) logger.info(f"Populating neo4j DB: Populating") database.neo_db.populate_DB(database.session) - logger.info(f"Populating neo4j DB: Complete") \ No newline at end of file + logger.info(f"Populating neo4j DB: Complete") diff --git a/application/database/db.py b/application/database/db.py index 0d58f043b..7f79a6b3d 100644 --- a/application/database/db.py +++ b/application/database/db.py @@ -463,7 +463,6 @@ def load_cre_graph(cls, session) -> nx.Graph: graph.add_edge(f"CRE: {lnk.cre}", f"Node: {str(lnk.node)}", ltype=lnk.type) return graph - class Node_collection: diff --git a/application/tests/db_test.py b/application/tests/db_test.py index 3c41908f1..714b11423 100644 --- a/application/tests/db_test.py +++ b/application/tests/db_test.py @@ -1306,7 +1306,6 @@ def test_gap_analysis_duplicate_link_path_existing_higher(self, gap_mock): } self.assertEqual(collection.gap_analysis(["a", "b"]), expected) - def test_get_embeddings_by_doc_type_paginated(self): """Given: a range of embedding for Nodes and a range of embeddings for CREs when called with doc_type CRE return the cre embeddings @@ -1471,6 +1470,5 @@ def test_get_embeddings_by_doc_type(self): self.assertEqual(tool_emb, {}) - if __name__ == "__main__": unittest.main() diff --git a/cre.py b/cre.py index c16c44da9..9593505e6 100644 --- a/cre.py +++ b/cre.py @@ -193,7 +193,6 @@ def main() -> None: help="populate the neo4j db", ) - args = parser.parse_args() from application.cmd import cre_main