From ed1085535e2c05b04f31b0d0ff933152b47bf5b5 Mon Sep 17 00:00:00 2001 From: miteruzo Date: Mon, 23 Dec 2024 05:15:22 +0900 Subject: [PATCH] =?UTF-8?q?#3=20mypy=20=E5=91=A8=E3=82=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config.py | 2 +- models.py | 4 ++-- mypy.ini | 2 ++ py.typed | 0 4 files changed, 5 insertions(+), 3 deletions(-) create mode 100644 mypy.ini create mode 100644 py.typed diff --git a/config.py b/config.py index fe04055..4c00db7 100644 --- a/config.py +++ b/config.py @@ -3,7 +3,7 @@ from __future__ import annotations import os from typing import TypedDict -from eloquent import DatabaseManager, Model # type: ignore +from eloquent import DatabaseManager, Model CONFIG: dict[str, DbConfig] = { 'mysql': { 'driver': 'mysql', 'host': 'localhost', diff --git a/models.py b/models.py index 77f5d15..76bac3f 100644 --- a/models.py +++ b/models.py @@ -2,9 +2,9 @@ from __future__ import annotations from datetime import datetime -from eloquent import Model # type: ignore +from eloquent import Model -from config import DB +from .config import DB class AnsweredFlag (Model): diff --git a/mypy.ini b/mypy.ini new file mode 100644 index 0000000..d787271 --- /dev/null +++ b/mypy.ini @@ -0,0 +1,2 @@ +[mypy] +disable_error_code = import-untyped diff --git a/py.typed b/py.typed new file mode 100644 index 0000000..e69de29