feat: indie status page MVP -- FastAPI + SQLite
- 8 DB models (services, incidents, monitors, subscribers, etc.) - Full CRUD API for services, incidents, monitors - Public status page with live data - Incident detail page with timeline - API key authentication - Uptime monitoring scheduler - 13 tests passing - TECHNICAL_DESIGN.md with full spec
This commit is contained in:
commit
902133edd3
4655 changed files with 1342691 additions and 0 deletions
32
venv/lib/python3.11/site-packages/mypyc/errors.py
Normal file
32
venv/lib/python3.11/site-packages/mypyc/errors.py
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
from __future__ import annotations
|
||||
|
||||
import mypy.errors
|
||||
from mypy.options import Options
|
||||
|
||||
|
||||
class Errors:
|
||||
def __init__(self, options: Options) -> None:
|
||||
self.num_errors = 0
|
||||
self.num_warnings = 0
|
||||
self._errors = mypy.errors.Errors(options, hide_error_codes=True)
|
||||
|
||||
def error(self, msg: str, path: str, line: int) -> None:
|
||||
self._errors.set_file(path, None, self._errors.options)
|
||||
self._errors.report(line, None, msg, severity="error")
|
||||
self.num_errors += 1
|
||||
|
||||
def note(self, msg: str, path: str, line: int) -> None:
|
||||
self._errors.set_file(path, None, self._errors.options)
|
||||
self._errors.report(line, None, msg, severity="note")
|
||||
|
||||
def warning(self, msg: str, path: str, line: int) -> None:
|
||||
self._errors.set_file(path, None, self._errors.options)
|
||||
self._errors.report(line, None, msg, severity="warning")
|
||||
self.num_warnings += 1
|
||||
|
||||
def new_messages(self) -> list[str]:
|
||||
return self._errors.new_messages()
|
||||
|
||||
def flush_errors(self) -> None:
|
||||
for error in self.new_messages():
|
||||
print(error)
|
||||
Loading…
Add table
Add a link
Reference in a new issue