make Ruff happy

This commit is contained in:
2025-10-25 23:08:27 -04:00
parent fe5c0e23b5
commit 626c865461
7 changed files with 21 additions and 21 deletions

View File

@@ -78,7 +78,7 @@ async def handle_logging(response):
else:
origin = "client"
except:
except Exception:
pass
if request.path.startswith("/.well-known/matrix/"):

View File

@@ -6,6 +6,8 @@ import asyncio
import random
import os
from .groups import groups
from flask import (
Blueprint,
jsonify,
@@ -15,8 +17,6 @@ from flask import (
client = Blueprint("client", __name__)
from .groups import groups
client.register_blueprint(groups)
@@ -159,7 +159,7 @@ async def register():
"device_id": "VVOONNAA"
})
except:
except Exception:
pass
return jsonify({
@@ -342,7 +342,7 @@ async def sync():
if "timeout" in request.args:
try:
wait_time = int(request.args.get("timeout")) / 1000
except:
except Exception:
pass
await asyncio.sleep(wait_time)
@@ -420,7 +420,7 @@ async def events():
if "timeout" in request.args:
try:
await asyncio.sleep(int(request.args["timeout"]) / 1000)
except:
except Exception:
pass
return jsonify({

View File

@@ -1 +1,2 @@
import vona.config
str(vona.config.server_name) # Satisfy Ruff

View File

@@ -2,13 +2,6 @@ from flask import (
Blueprint,
)
custom = Blueprint("custom", __name__)
# This implements non-standard
# endpoints created by other
# homeserver implementations.
from .hammerhead import hammerhead
from .conduwuit import conduwuit
from .dendrite import dendrite
@@ -16,6 +9,13 @@ from .telodendria import telo
from .synapse import synapse
from .citadel import citadel
custom = Blueprint("custom", __name__)
# This implements non-standard
# endpoints created by other
# homeserver implementations.
custom.register_blueprint(hammerhead)
custom.register_blueprint(conduwuit)
custom.register_blueprint(dendrite)

View File

@@ -348,7 +348,7 @@ async def extremities(room):
if room.split(":")[1] != config.server_name:
return jsonify({
"errcode": "M_NOT_FOUND",
"error": f"Room is unknown to this server"
"error": "Room is unknown to this server"
}), 404
room_ver = globals.room_version_from_id(room)
@@ -420,7 +420,7 @@ async def state_ids(room):
raise
return jsonify(resp.json())
except:
except Exception:
pass
return explode()

View File

@@ -374,9 +374,9 @@ class http_client:
)
def strip_state(l) -> list:
if not isinstance(l, list):
return l
def strip_state(state_events) -> list:
if not isinstance(state_events, list):
return state_events
keys_to_remove = [
"auth_events",
@@ -387,7 +387,7 @@ def strip_state(l) -> list:
]
new_list = []
for d in l:
for d in state_events:
if not isinstance(d, dict):
new_list.append(d)
continue

View File

@@ -1,5 +1,4 @@
import vona.globals as globals
import vona.config as config
import multiprocessing
versions = [str(i) for i in range(1, 10)]
@@ -19,7 +18,7 @@ def worker(room_found):
print(room_id)
room_found.value = True
break
except Exception as e:
except Exception:
pass