make Ruff happy
This commit is contained in:
@@ -78,7 +78,7 @@ async def handle_logging(response):
|
||||
else:
|
||||
origin = "client"
|
||||
|
||||
except:
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
if request.path.startswith("/.well-known/matrix/"):
|
||||
|
||||
@@ -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({
|
||||
|
||||
@@ -1 +1,2 @@
|
||||
import vona.config
|
||||
str(vona.config.server_name) # Satisfy Ruff
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user