diff --git a/CHANGELOG.md b/CHANGELOG.md index 015cb68d2..ced235c44 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed +- Removed unassigned variable names - Contributing guidelines steps for installing for the first time - Updated gitignore to ignore yarn files and folders for latest version of yarn diff --git a/covalent/_shared_files/config.py b/covalent/_shared_files/config.py index 57c5eb4f3..f4556afd9 100644 --- a/covalent/_shared_files/config.py +++ b/covalent/_shared_files/config.py @@ -46,7 +46,7 @@ def __init__(self) -> None: self.generate_default_config() try: - with open(self.config_file, "r") as f: + with open(self.config_file, "r"): pass self.update_config() diff --git a/covalent/_workflow/depsbash.py b/covalent/_workflow/depsbash.py index 8746a2012..e92b35d38 100644 --- a/covalent/_workflow/depsbash.py +++ b/covalent/_workflow/depsbash.py @@ -24,7 +24,7 @@ def apply_bash_commands(commands): for cmd in commands: - proc = subprocess.run( + subprocess.run( cmd, stdin=subprocess.DEVNULL, shell=True, capture_output=True, check=True, text=True ) diff --git a/covalent/executor/base.py b/covalent/executor/base.py index 6b80e7130..23ddfb34f 100644 --- a/covalent/executor/base.py +++ b/covalent/executor/base.py @@ -377,8 +377,8 @@ def execute( output: The result of the function execution. """ - dispatch_info = DispatchInfo(dispatch_id) - fn_version = function.args[0].python_version + DispatchInfo(dispatch_id) + function.args[0].python_version self._task_stdout = io.StringIO() self._task_stderr = io.StringIO() @@ -392,10 +392,10 @@ def execute( self.setup(task_metadata=task_metadata) result = self.run(function, args, kwargs, task_metadata) job_status = RESULT_STATUS.COMPLETED - except TaskRuntimeError as err: + except TaskRuntimeError: job_status = RESULT_STATUS.FAILED result = None - except TaskCancelledError as err: + except TaskCancelledError: job_status = RESULT_STATUS.CANCELLED result = None finally: @@ -651,10 +651,10 @@ async def execute( await self.setup(task_metadata=task_metadata) result = await self.run(function, args, kwargs, task_metadata) job_status = RESULT_STATUS.COMPLETED - except TaskCancelledError as err: + except TaskCancelledError: job_status = RESULT_STATUS.CANCELLED result = None - except TaskRuntimeError as err: + except TaskRuntimeError: job_status = RESULT_STATUS.FAILED result = None finally: diff --git a/covalent_dispatcher/_cli/service.py b/covalent_dispatcher/_cli/service.py index 1282d7502..815f42e09 100644 --- a/covalent_dispatcher/_cli/service.py +++ b/covalent_dispatcher/_cli/service.py @@ -238,7 +238,7 @@ def _graceful_start( try: requests.get(dispatcher_addr, timeout=1) up = True - except requests.exceptions.ConnectionError as err: + except requests.exceptions.ConnectionError: time.sleep(1) Path(get_config("dispatcher.cache_dir")).mkdir(parents=True, exist_ok=True) @@ -643,7 +643,7 @@ def status() -> None: try: response = requests.get(f"http://localhost:{port}/api/triggers/status", timeout=1) trigger_status = response.json()["status"] - except requests.exceptions.ConnectionError as err: + except requests.exceptions.ConnectionError: trigger_status = "stopped" if trigger_status == "running": diff --git a/covalent_ui/api/v1/data_layer/summary_dal.py b/covalent_ui/api/v1/data_layer/summary_dal.py index 0442d1a7d..175a1aea9 100644 --- a/covalent_ui/api/v1/data_layer/summary_dal.py +++ b/covalent_ui/api/v1/data_layer/summary_dal.py @@ -58,7 +58,6 @@ def get_summary( Return: List of top most Lattices and count """ - result = None status_filters = self.get_filters(status_filter) diff --git a/tests/covalent_dispatcher_tests/_cli/groups/db_test.py b/tests/covalent_dispatcher_tests/_cli/groups/db_test.py index 2b7690a51..80cd42eec 100644 --- a/tests/covalent_dispatcher_tests/_cli/groups/db_test.py +++ b/tests/covalent_dispatcher_tests/_cli/groups/db_test.py @@ -36,7 +36,7 @@ def test_migration_success(mocker): runner = CliRunner() db_mock = Mock() mocker.patch.object(DataStore, "factory", lambda: db_mock) - res = runner.invoke(migrate, catch_exceptions=False) + runner.invoke(migrate, catch_exceptions=False) db_mock.run_migrations.assert_called_once()