Skip to content

Commit 9933264

Browse files
committed
fix current ruff pre-commit errors
1 parent 83a1a79 commit 9933264

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

python/populse_db/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,7 @@ def __init__(self, database_url, timeout=None, create=False, echo_sql=None):
128128
# because it does not exist in Pyodide distribution (i.e.
129129
# PyScript).
130130
from .engine.sqlite import create_sqlite_session_factory
131+
131132
self.session_factory = create_sqlite_session_factory(self.url)
132133

133134
else:

python/populse_db/server.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
from typing import Annotated
44

55
import uvicorn
6-
from fastapi import Body, Query, FastAPI, Request
6+
from fastapi import Body, FastAPI, Query, Request
77
from fastapi.responses import JSONResponse
88

99
from .database import json_decode, json_encode, populse_db_table
@@ -27,13 +27,13 @@ def str_to_json(value):
2727
return json.loads(value)
2828
return value
2929

30+
3031
def create_server(database_file, create=True):
3132
storage_api = StorageFileAPI(database_file, create=create)
3233
app = FastAPI()
3334

3435
@app.middleware("http")
3536
async def cors_middleware(request: Request, call_next):
36-
3737
response = await call_next(request)
3838
response.headers["Access-Control-Allow-Origin"] = "*"
3939
response.headers["Access-Control-Allow-Methods"] = "*"

python/populse_db/test/test_storage.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -464,7 +464,7 @@ def run_storage_tests(store):
464464
def test_storage():
465465
store = Storage("/tmp/i_do_not_exist")
466466
with pytest.raises(RuntimeError):
467-
with store.data() as d:
467+
with store.data() as _:
468468
pass
469469

470470
with NamedTemporaryFile(delete=True) as tmp:

0 commit comments

Comments
 (0)