From 8e1a4e6170d6337f6dd556d5381eb65bc737c5b6 Mon Sep 17 00:00:00 2001 From: Jae Aeich Date: Mon, 22 Jan 2024 19:09:55 +0530 Subject: [PATCH] chore: add types and refactor mypy.ini --- mypy.ini | 16 ++++++++++++++-- pro_wes/tasks/track_run_progress.py | 2 +- requirements_dev.txt | 5 +++-- 3 files changed, 18 insertions(+), 5 deletions(-) diff --git a/mypy.ini b/mypy.ini index 338937c..43d8804 100644 --- a/mypy.ini +++ b/mypy.ini @@ -1,6 +1,18 @@ [mypy] +disable_error_code = attr-defined + +[mypy-foca.*] ignore_missing_imports = True disable_error_code = attr-defined -disable_error_code = no-redef -# [mypy-pro_wes.*] \ No newline at end of file +[mypy-celery.*] +ignore_missing_imports = True + +[mypy-connexion.*] +ignore_missing_imports = True + +[mypy-pymongo.*] +ignore_missing_imports = True + +[mypy-bson.objectid] +ignore_missing_imports = True \ No newline at end of file diff --git a/pro_wes/tasks/track_run_progress.py b/pro_wes/tasks/track_run_progress.py index 2d16752..9d26192 100644 --- a/pro_wes/tasks/track_run_progress.py +++ b/pro_wes/tasks/track_run_progress.py @@ -2,7 +2,7 @@ import logging from time import sleep -from typing import Dict, Optional, Mapping +from typing import Dict, Optional from foca.database.register_mongodb import _create_mongo_client from foca.models.config import Config diff --git a/requirements_dev.txt b/requirements_dev.txt index dc0a280..fb589bd 100644 --- a/requirements_dev.txt +++ b/requirements_dev.txt @@ -6,5 +6,6 @@ pylint>=2.15.5,<3 pytest>=7.2.0,<8 python-semantic-release>=7.32.2,<8 mypy~=1.8 -types-setuptools -types-requests \ No newline at end of file +types-setuptools~=69.0.0.20240106 +types-requests~=2.31.0.20240106 +types-docutils~=0.20.0.20240106 \ No newline at end of file