Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove unassigned variable names #1796

Merged
merged 10 commits into from
Oct 2, 2023
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Operations

- Removed unassigned variable names
Andrew-S-Rosen marked this conversation as resolved.
Show resolved Hide resolved
- Changed `actions/checkout@v3` to `actions/checkout@v4` in CI
- Dependabot update to npm in changelog action
- Update tough-cookie to 4.1.3 version
Expand Down
2 changes: 1 addition & 1 deletion covalent/_shared_files/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
2 changes: 1 addition & 1 deletion covalent/_workflow/depsbash.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
)

Expand Down
12 changes: 6 additions & 6 deletions covalent/executor/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand All @@ -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:
Expand Down Expand Up @@ -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:
Expand Down
4 changes: 2 additions & 2 deletions covalent_dispatcher/_cli/service.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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":
Expand Down
1 change: 0 additions & 1 deletion covalent_ui/api/v1/data_layer/summary_dal.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ def get_summary(
Return:
List of top most Lattices and count
"""
result = None

status_filters = self.get_filters(status_filter)

Expand Down
2 changes: 1 addition & 1 deletion tests/covalent_dispatcher_tests/_cli/groups/db_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()


Expand Down
Loading