app/liteyukibot/context/__init__.py
Snowykami 1de7d81693 ️ Refactor LiteyukiBot structure and add configuration loading
- Updated .gitignore to include .pytest_cache
- Replaced FastAPI with Daemon in main.py for bot execution
- Enhanced pyproject.toml with new dependencies and dev group
- Added iniconfig package for pytest configuration
- Created initial structure for liteyukibot with context management
- Implemented configuration loading functions for YAML, JSON, and TOML
- Added tests for configuration loading with temporary files
- Set up GitHub Actions for pytest testing on push and pull requests
2025-04-28 00:56:07 +08:00

15 lines
315 B
Python

class Context:
def __init__(self):
self._context = {}
def set(self, key, value):
self._context[key] = value
def get(self, key):
return self._context.get(key)
def clear(self):
self._context.clear()
def __repr__(self):
return f"Context({self._context})"