moops 0.3.2__tar.gz → 0.3.3__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: moops
3
- Version: 0.3.2
3
+ Version: 0.3.3
4
4
  Summary: Write Marimo notebooks that also work as CLI scripts, with unified UI controls
5
5
  Keywords: marimo,notebooks,cli,testing
6
6
  Author: Yair Chuchem
@@ -4,7 +4,7 @@ build-backend = "uv_build"
4
4
 
5
5
  [project]
6
6
  name = "moops"
7
- version = "0.3.2"
7
+ version = "0.3.3"
8
8
  description = "Write Marimo notebooks that also work as CLI scripts, with unified UI controls"
9
9
  license = "MIT"
10
10
  readme = "README.md"
@@ -3,6 +3,8 @@ import typing
3
3
 
4
4
  import marimo as mo
5
5
 
6
+ from . import interface
7
+
6
8
 
7
9
  class _Embed(typing.Protocol):
8
10
  defs: typing.Mapping[str, typing.Any]
@@ -50,7 +52,9 @@ class Passthrough:
50
52
  def __init__(self, source: _Embed | dict[str, typing.Any]) -> None:
51
53
  self.defs = {
52
54
  "result": (source if isinstance(source, dict) else source.defs)["result"],
53
- "interface": None,
55
+ "interface": interface.Interface(
56
+ controls=typing.cast(tuple[typing.Any], ())
57
+ ),
54
58
  }
55
59
  self.output = None
56
60
 
@@ -79,11 +79,7 @@ class Group:
79
79
  raise ValueError("markdown_heading_offset must be non-negative")
80
80
  _frame = inspect.currentframe()
81
81
  _caller = _frame.f_back if _frame else None
82
- if (
83
- _caller is not None
84
- and mo.running_in_notebook()
85
- and bool(_caller.f_code.co_flags & inspect.CO_COROUTINE)
86
- ):
82
+ if _caller is not None and bool(_caller.f_code.co_flags & inspect.CO_COROUTINE):
87
83
  warnings.warn(
88
84
  f"args.subgroup('{prefix}') called inside an async cell, "
89
85
  "likely the cell making the embed it is used for. "
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes