Skip to content

Commit

Permalink
Remove deprecated import str2bool
Browse files Browse the repository at this point in the history
  • Loading branch information
Ruishenl committed Jan 9, 2025
1 parent 53fcaf2 commit 5bbd325
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion invertedai/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
import warnings
import importlib.metadata
__version__ = importlib.metadata.version("invertedai")
from distutils.util import strtobool

from invertedai.api.light import light
from invertedai.api.location import location_info
Expand All @@ -23,6 +22,12 @@

warnings.filterwarnings(action="once",message=".*agent_attributes.*")

def strtobool(value: str) -> bool:
value = value.lower()
if value in ("y", "yes", "on", "1", "true", "t"):
return True
return False

dev = strtobool(os.environ.get("IAI_DEV", "false"))
if dev:
dev_url = os.environ.get("IAI_DEV_URL", "http://localhost:8000")
Expand Down

0 comments on commit 5bbd325

Please sign in to comment.