From 11dc22d72ce870887e4d53afdf2222b6e669ea22 Mon Sep 17 00:00:00 2001 From: duzhuoshanwai <65448395+duzhuoshanwai@users.noreply.github.com> Date: Tue, 13 May 2025 08:06:37 +0800 Subject: [PATCH 1/2] fix: add pathlib dependency --- examples/blog/src/blog/__init__.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/examples/blog/src/blog/__init__.py b/examples/blog/src/blog/__init__.py index 47cd836..a9e9283 100644 --- a/examples/blog/src/blog/__init__.py +++ b/examples/blog/src/blog/__init__.py @@ -1,4 +1,5 @@ from sqlite3 import dbapi2 as sqlite3 +from pathlib import Path from quart import g from quart import Quart @@ -11,7 +12,7 @@ app.config.update( { - "DATABASE": app.root_path / "blog.db", + "DATABASE": Path(app.root_path) / "blog.db", } ) @@ -57,7 +58,7 @@ async def create(): def init_db(): db = _connect_db() - with open(app.root_path / "schema.sql") as file_: + with open(Path(app.root_path) / "schema.sql") as file_: db.cursor().executescript(file_.read()) db.commit() From 287e09c5619436ea62c496bd0af12e304109eb55 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci-lite[bot]" <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com> Date: Tue, 13 May 2025 00:22:05 +0000 Subject: [PATCH 2/2] [pre-commit.ci lite] apply automatic fixes --- examples/blog/src/blog/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/blog/src/blog/__init__.py b/examples/blog/src/blog/__init__.py index a9e9283..6f17263 100644 --- a/examples/blog/src/blog/__init__.py +++ b/examples/blog/src/blog/__init__.py @@ -1,5 +1,5 @@ -from sqlite3 import dbapi2 as sqlite3 from pathlib import Path +from sqlite3 import dbapi2 as sqlite3 from quart import g from quart import Quart