refactor: AgentProvider.dockerfile always returns Path, never None
lint / lint (push) Failing after 1m50s
test / unit (pull_request) Successful in 40s
test / integration (pull_request) Successful in 59s

The convention is that every provider declares a Dockerfile location;
callers that care whether the file actually exists check .is_file().
Drops all `is not None` guards on the property result.
This commit is contained in:
2026-06-08 06:06:51 +00:00
parent 41590ede1f
commit e0ecb7ceb1
4 changed files with 15 additions and 24 deletions
+4 -7
View File
@@ -122,14 +122,11 @@ def resolve_plan(
image_default = f"bot-bottle-{provider.template}:{slug}"
else:
p_dockerfile = provider_obj.dockerfile
if p_dockerfile is not None:
agent_dockerfile_path = str(p_dockerfile)
if provider.template in PROVIDER_TEMPLATES:
image_default = provider_runtime.image
else:
image_default = f"bot-bottle-{provider.template}:{slug}"
else:
agent_dockerfile_path = str(p_dockerfile)
if provider.template in PROVIDER_TEMPLATES:
image_default = provider_runtime.image
else:
image_default = f"bot-bottle-{provider.template}:{slug}"
agent_image_ref = image_default
agent_provision = agent_provision_plan(
template=provider.template,