Skip to content

Commit

Permalink
fix sub inits
Browse files Browse the repository at this point in the history
  • Loading branch information
shroominic committed Oct 30, 2024
1 parent 67debe4 commit eec6072
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/codeboxapi/codebox.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,11 @@ def __new__(
api_key = api_key or os.getenv("CODEBOX_API_KEY", "local")
factory_id = factory_id or os.getenv("CODEBOX_FACTORY_ID", "default")
if api_key == "local":
return super().__new__(import_module("codeboxapi.local").LocalBox)
return import_module("codeboxapi.local").LocalBox()

if api_key == "docker":
return super().__new__(import_module("codeboxapi.docker").DockerBox)

return super().__new__(import_module("codeboxapi.remote").RemoteBox)
return import_module("codeboxapi.docker").DockerBox()
return import_module("codeboxapi.remote").RemoteBox()

def __init__(
self,
Expand Down

0 comments on commit eec6072

Please sign in to comment.