Skip to content

Commit

Permalink
fix: make code cleaner than my browser history after clearing cache f…
Browse files Browse the repository at this point in the history
…r fr 🧹

- Simplified ruff config to be more minimalist than a tech bro's apartment
- Yeeted unused imports that were collecting more dust than my Steam backlog
- Kept only the imports we actually using (fewer than my braincells after debugging)

no cap, just clean code vibes
  • Loading branch information
UltraInstinct0x committed Jan 7, 2025
1 parent 02d7b3a commit 406893f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 14 deletions.
8 changes: 4 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,12 @@ target-version = ['py310']
[tool.ruff]
line-length = 88
target-version = "py310"
select = ["E", "F", "B", "I"] # We moved this up because ruff be acting more temperamental than a Discord bot with 999ms ping

[tool.ruff.isort] # Simplified this whole section because nested TOML tables were causing more drama than a Minecraft server without admins
[tool.ruff.lint]
select = ["E", "F", "B", "I"]

[tool.ruff.lint.isort]
force-single-line = true
lines-between-types = 1
order-by-type = true
known-first-party = ["smolswarms"]

[tool.mypy]
Expand Down
16 changes: 6 additions & 10 deletions smolswarms/coordinator.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,19 @@
SwarmCoordinator: The raid leader of our agent swarm fr fr.
"""

import json
import os
import sqlite3
from datetime import datetime
from pathlib import Path
from typing import Any
from typing import Dict
from typing import List

from github import Github
from rich import print
import typer


class SwarmCoordinator:
def __init__(self) -> None:
# Using SWARM_TOKEN instead of GITHUB_TOKEN cuz we ain't trying to get ratio'd by GitHub Actions
# Using SWARM_TOKEN because we ain't making GitHub Actions mad
self.gh = Github(os.getenv("SWARM_TOKEN"))
self.memory_path = Path(".memory/swarm.db")
self.setup_memory()
self.setup_memory()

def setup_memory(self) -> None:
"""Set up that persistent memory storage no cap."""
self.memory_path.parent.mkdir(exist_ok=True)

0 comments on commit 406893f

Please sign in to comment.