Skip to content

Commit

Permalink
pr
Browse files Browse the repository at this point in the history
  • Loading branch information
wwwillchen committed Nov 12, 2024
1 parent 97d7743 commit d831a1d
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
4 changes: 0 additions & 4 deletions mesop/env/env.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import logging
import os

from mesop.exceptions import MesopDeveloperException
Expand Down Expand Up @@ -40,6 +39,3 @@ def get_app_base_path() -> str:
EXPERIMENTAL_EDITOR_TOOLBAR_ENABLED = (
os.environ.get("MESOP_EXPERIMENTAL_EDITOR_TOOLBAR", "false").lower() == "true"
)

if EXPERIMENTAL_EDITOR_TOOLBAR_ENABLED:
logging.info("Experiment enabled: EXPERIMENTAL_EDITOR_TOOLBAR_ENABLED")
5 changes: 2 additions & 3 deletions mesop/labs/text_to_text.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
from typing import Callable, Generator, Literal, cast

import mesop as me
from mesop.warn import warn


@me.stateclass
Expand Down Expand Up @@ -30,9 +31,7 @@ def text_io(
- "append": Concatenates each new piece of text to the existing output.
- "replace": Replaces the existing output with each new piece of text.
"""
print(
"\033[93m[warning]\033[0m text_io is deprecated, use text_to_text instead"
)
warn("text_io is deprecated, use text_to_text instead")
text_to_text(transform=transform, title=title, transform_mode=transform_mode)


Expand Down
7 changes: 6 additions & 1 deletion mesop/warn/warn.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,7 @@
import logging

logger = logging.getLogger(__name__)


def warn(message: str) -> None:
print("\033[93m[warning]\033[0m " + message)
logger.warning("\033[93m[warning]\033[0m " + message)

0 comments on commit d831a1d

Please sign in to comment.