1
1
forked from iarv/meshview

Bump ruff version - fix open call from lang work

This commit is contained in:
Joel Krauska
2025-10-03 21:34:13 -07:00
parent fbd6fcb123
commit e1bada8378
3 changed files with 6 additions and 6 deletions

View File

@@ -26,7 +26,7 @@ jobs:
key: ruff-${{ runner.os }}-${{ hashFiles('**/pyproject.toml', '**/ruff.toml') }}
- name: Install Ruff
run: pip install "ruff==0.6.9"
run: pip install "ruff==0.13.3"
# Lint (with GitHub annotation format for inline PR messages)
- name: Ruff check

View File

@@ -1,6 +1,6 @@
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.6.9 # pin the latest youre comfortable with
rev: v0.13.3 # pin the latest youre comfortable with
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix] # fail if it had to change files

View File

@@ -1335,7 +1335,7 @@ async def nodegraph(request):
edge_pair = (node.node_id, packet.from_node_id)
edges_map[edge_pair]["weight"] += 1
edges_map[edge_pair]["type"] = ("neighbor")
edges_map[edge_pair]["type"] = "neighbor"
except Exception as e:
logger.error(f"Error decoding NeighborInfo packet: {e}")
@@ -1691,6 +1691,7 @@ async def api_edges(request):
f"Error decoding NeighborInfo packet {getattr(packet, 'id', '?')}: {e}"
)
@routes.get("/api/lang")
async def api_lang(request):
# Language from ?lang=xx, fallback to config, then to "en"
@@ -1702,7 +1703,7 @@ async def api_lang(request):
lang_file = os.path.join(LANG_DIR, "en.json")
# Load JSON translations
with open(lang_file, "r", encoding="utf-8") as f:
with open(lang_file, encoding="utf-8") as f:
translations = json.load(f)
if section:
@@ -1711,8 +1712,7 @@ async def api_lang(request):
return web.json_response(translations[section])
else:
return web.json_response(
{"error": f"Section '{section}' not found in {lang_code}"},
status=404
{"error": f"Section '{section}' not found in {lang_code}"}, status=404
)
# if no section requested → return full translation file