Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion samples/bmad-agent-dream-weaver/scripts/merge-config.py
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@ def write_config(config: dict, config_path: str, verbose: bool = False) -> None:
)


def main():
def main() -> None:
args = parse_args()

# Load inputs
Expand Down
2 changes: 1 addition & 1 deletion samples/bmad-agent-dream-weaver/scripts/merge-help-csv.py
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ def cleanup_legacy_csvs(
return deleted


def main():
def main() -> None:
args = parse_args()

# Read source entries
Expand Down
2 changes: 1 addition & 1 deletion samples/bmad-agent-dream-weaver/scripts/recall_metrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ def calculate_metrics(entries: list[dict]) -> dict:
}


def main():
def main() -> None:
parser = argparse.ArgumentParser(
description="Calculate dream recall metrics"
)
Expand Down
2 changes: 1 addition & 1 deletion samples/bmad-agent-dream-weaver/scripts/seed_tracker.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ def analyze_seeds(seeds: list[dict]) -> dict:
}


def main():
def main() -> None:
parser = argparse.ArgumentParser(
description="Analyze dream seed success rates"
)
Expand Down
2 changes: 1 addition & 1 deletion samples/bmad-agent-dream-weaver/scripts/symbol_stats.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ def analyze_symbols(entries: list[dict]) -> dict:
return results


def main():
def main() -> None:
parser = argparse.ArgumentParser(
description="Analyze dream journal symbol frequency"
)
Expand Down
22 changes: 11 additions & 11 deletions samples/bmad-excalidraw/scripts/generate_excalidraw.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
BG_CYCLE = ["bg_blue", "bg_green", "bg_yellow", "bg_purple", "bg_red", "bg_gray"]


def generate_id(length=8):
def generate_id(length: int=8):
"""Generate a random alphanumeric ID."""
chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"
return "".join(random.choice(chars) for _ in range(length))
Expand All @@ -87,7 +87,7 @@ def now_ms():
# --- Element Builders ---


def make_base_element(elem_type, x, y, width, height, **overrides):
def make_base_element(elem_type, x, y, width: int, height: int, **overrides):
"""Create a base element with all required properties."""
base = {
"id": generate_id(),
Expand Down Expand Up @@ -120,7 +120,7 @@ def make_base_element(elem_type, x, y, width, height, **overrides):
return base


def make_shape(elem_type, x, y, label, width=None, height=None, bg_color=None):
def make_shape(elem_type, x, y, label: str, width: int=None, height: int=None, bg_color=None) -> tuple:
"""Create a shape element (rectangle, diamond, ellipse) with bound text."""
default_w, default_h = ELEMENT_SIZES.get(elem_type, (200, 80))
w = width or default_w
Expand All @@ -142,7 +142,7 @@ def make_shape(elem_type, x, y, label, width=None, height=None, bg_color=None):
return shape, text_elem


def make_text(x, y, text, container_id=None, width=200, height=80, font_size=20):
def make_text(x, y, text: str, container_id: int=None, width: int=200, height: int=80, font_size: int=20):
"""Create a text element, optionally bound to a container."""
text_height = 25
text_width = len(text) * 10
Expand Down Expand Up @@ -171,8 +171,8 @@ def make_text(x, y, text, container_id=None, width=200, height=80, font_size=20)
return elem


def make_arrow(x1, y1, x2, y2, start_id=None, end_id=None, label=None,
style="arrow", start_shape=None, end_shape=None):
def make_arrow(x1, y1, x2, y2, start_id: int=None, end_id: int=None, label: str=None,
style: str="arrow", start_shape=None, end_shape=None):
"""Create an arrow/line element connecting two points or elements."""
dx = x2 - x1
dy = y2 - y1
Expand Down Expand Up @@ -252,7 +252,7 @@ def _compute_fixed_point(dx, dy, end):
return [0.5, 0] if end == "start" else [0.5, 1]


def make_frame(x, y, width, height, name):
def make_frame(x, y, width: int, height: int, name: str):
"""Create a frame element."""
elem = make_base_element("frame", x, y, width, height)
elem["name"] = name
Expand All @@ -263,7 +263,7 @@ def make_frame(x, y, width, height, name):
# --- Layout Engines ---


def layout_grid(elements, direction="LR", start_x=100, start_y=100):
def layout_grid(elements: list, direction: str="LR", start_x: int=100, start_y: int=100):
"""
Position elements in a grid layout based on connection topology.
Returns dict mapping element ID to (x, y) position.
Expand Down Expand Up @@ -301,7 +301,7 @@ def layout_grid(elements, direction="LR", start_x=100, start_y=100):
return positions


def layout_linear(elements, connections, direction="LR", start_x=100, start_y=100):
def layout_linear(elements: list, connections, direction: str="LR", start_x: int=100, start_y: int=100) -> dict:
"""
Position elements in a linear chain following connections.
Better for flowcharts than grid layout.
Expand Down Expand Up @@ -370,7 +370,7 @@ def layout_linear(elements, connections, direction="LR", start_x=100, start_y=10
return positions


def layout_radial(elements, connections, start_x=500, start_y=400):
def layout_radial(elements: list, connections, start_x: int=500, start_y: int=400) -> dict:
"""Position elements in a radial layout for mind maps."""
if not elements:
return {}
Expand Down Expand Up @@ -559,7 +559,7 @@ def generate_excalidraw(spec):
return doc


def main():
def main() -> None:
parser = argparse.ArgumentParser(
description="Generate Excalidraw diagrams from a JSON specification",
)
Expand Down
4 changes: 2 additions & 2 deletions samples/bmad-excalidraw/scripts/validate_excalidraw.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
VALID_ARROWHEADS = {None, "arrow", "bar", "dot", "triangle"}


def validate(file_path):
def validate(file_path: str):
"""Validate an .excalidraw file and return findings."""
findings = []

Expand Down Expand Up @@ -240,7 +240,7 @@ def _build_result(file_path, findings):
}


def main():
def main() -> None:
parser = argparse.ArgumentParser(description="Validate .excalidraw files")
parser.add_argument("file", help="Path to .excalidraw file")
parser.add_argument("-o", "--output", help="Output report to file (JSON)")
Expand Down
2 changes: 1 addition & 1 deletion skills/bmad-bmb-setup/scripts/cleanup-legacy.py
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ def cleanup_directories(
return removed, not_found, total_files


def main():
def main() -> None:
args = parse_args()

bmad_dir = args.bmad_dir
Expand Down
2 changes: 1 addition & 1 deletion skills/bmad-bmb-setup/scripts/merge-config.py
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@ def write_config(config: dict, config_path: str, verbose: bool = False) -> None:
)


def main():
def main() -> None:
args = parse_args()

# Load inputs
Expand Down
2 changes: 1 addition & 1 deletion skills/bmad-bmb-setup/scripts/merge-help-csv.py
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ def cleanup_legacy_csvs(
return deleted


def main():
def main() -> None:
args = parse_args()

# Read source entries
Expand Down
2 changes: 1 addition & 1 deletion skills/bmad-module-builder/assets/setup-skill-template/scripts/cleanup-legacy.py
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ def cleanup_directories(
return removed, not_found, total_files


def main():
def main() -> None:
args = parse_args()

bmad_dir = args.bmad_dir
Expand Down
2 changes: 1 addition & 1 deletion skills/bmad-module-builder/assets/setup-skill-template/scripts/merge-config.py
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@ def write_config(config: dict, config_path: str, verbose: bool = False) -> None:
)


def main():
def main() -> None:
args = parse_args()

# Load inputs
Expand Down
2 changes: 1 addition & 1 deletion skills/bmad-module-builder/assets/setup-skill-template/scripts/merge-help-csv.py
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ def cleanup_legacy_csvs(
return deleted


def main():
def main() -> None:
args = parse_args()

# Read source entries
Expand Down
2 changes: 1 addition & 1 deletion skills/bmad-module-builder/assets/standalone-module-template/merge-config.py
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@ def write_config(config: dict, config_path: str, verbose: bool = False) -> None:
)


def main():
def main() -> None:
args = parse_args()

# Load inputs
Expand Down
2 changes: 1 addition & 1 deletion skills/bmad-module-builder/assets/standalone-module-template/merge-help-csv.py
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ def cleanup_legacy_csvs(
return deleted


def main():
def main() -> None:
args = parse_args()

# Read source entries
Expand Down