Add /n/ short link alias and simplify CI lint job

- Add /n/{public_key} route as alias for /nodes/{public_key} for shorter URLs
- Replace individual lint tools in CI with pre-commit/action for consistency
This commit is contained in:
Louis King
2026-01-26 21:41:33 +00:00
parent 4af0f2ea80
commit ca101583f0
2 changed files with 3 additions and 14 deletions

View File

@@ -18,20 +18,8 @@ jobs:
with:
python-version: "3.13"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install black flake8 mypy
pip install -e ".[dev]"
- name: Check formatting with black
run: black --check src/ tests/
- name: Lint with flake8
run: flake8 src/ tests/
- name: Type check with mypy
run: mypy src/
- name: Run pre-commit
uses: pre-commit/action@v3.0.1
test:
name: Test (Python ${{ matrix.python-version }})

View File

@@ -82,6 +82,7 @@ async def nodes_list(
@router.get("/nodes/{public_key}", response_class=HTMLResponse)
@router.get("/n/{public_key}", response_class=HTMLResponse)
async def node_detail(request: Request, public_key: str) -> HTMLResponse:
"""Render the node detail page."""
templates = get_templates(request)