From a777466191abfa68cc732e106535ad00684d3080 Mon Sep 17 00:00:00 2001 From: Vishnu Challa Date: Wed, 18 Dec 2024 10:11:14 -0500 Subject: [PATCH] Fix liniting errors and update lint workflow Signed-off-by: Vishnu Challa --- .github/workflows/pylint.yaml | 1 - orion.py | 2 +- pkg/config.py | 3 +-- requirements.txt | 1 + 4 files changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/pylint.yaml b/.github/workflows/pylint.yaml index 267f7eb..59da43d 100644 --- a/.github/workflows/pylint.yaml +++ b/.github/workflows/pylint.yaml @@ -23,7 +23,6 @@ jobs: - name: Install dependencies run: | python -m pip install --upgrade pip - pip install pylint pip install -r requirements.txt - name: Analysing the code with pylint diff --git a/orion.py b/orion.py index d9a21b9..3690213 100644 --- a/orion.py +++ b/orion.py @@ -124,7 +124,7 @@ def cmd_analysis(**kwargs): logger_instance = SingletonLogger(debug=level, name="Orion") logger_instance.info("🏹 Starting Orion in command-line mode") if len(kwargs["ack"]) > 1 : - kwargs["ackMap"] = load_ack(kwargs["ack"]) + kwargs["ackMap"] = load_ack(kwargs["ack"]) kwargs["configMap"] = load_config(kwargs["config"]) output, regression_flag = run(**kwargs) if output is None: diff --git a/pkg/config.py b/pkg/config.py index de8a17d..69c4791 100644 --- a/pkg/config.py +++ b/pkg/config.py @@ -55,6 +55,7 @@ def load_config(config: str, parameters: Dict= None) -> Dict[str, Any]: return rendered_config def load_ack(ack: str) -> Dict[str,Any]: + "Loads acknowledgment file content." logger_instance = SingletonLogger.getLogger("Orion") try: with open(ack, "r", encoding="utf-8") as template_file: @@ -67,8 +68,6 @@ def load_ack(ack: str) -> Dict[str,Any]: logger_instance.error("An error occurred: %s", e) sys.exit(1) - required_parameters = get_template_variables(template_content) - rendered_config = yaml.safe_load(template_content) return rendered_config diff --git a/requirements.txt b/requirements.txt index c36cce9..4e3031d 100644 --- a/requirements.txt +++ b/requirements.txt @@ -18,3 +18,4 @@ python-multipart==0.0.9 scikit-learn==1.5.0 scipy==1.12.0 uvicorn==0.28.0 +pylint==3.3.2