Skip to content

Conversation

@jacomago
Copy link
Contributor

No description provided.

@jacomago jacomago self-assigned this Nov 10, 2025
@jacomago jacomago marked this pull request as ready for review November 11, 2025 07:21
sleep_time=10,
) -> str:
container_id = container_id or compose.get_container(host_name).ID
if container_id:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Generally prefer inverting these:

if not container_id:
  raise Exception()
# all the other stuff

🔧

time.sleep(sleep_time)
container.remove()
docker_client.containers.run(
image, detach=True, environment={"IOC_NAME": host_name}, hostname=new_host_name, network=list(networks)[0]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't matter hugely in this context (due to small nbr of entities), but prefer next(iter(sequence)) over list(sequence)[0] 🔧

@jacomago jacomago merged commit 6b47a8b into master Nov 11, 2025
20 checks passed
@sonarqubecloud
Copy link

@jacomago jacomago deleted the alias_test branch November 11, 2025 14:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants