From 1ca71fa40a4bf06789e17eab6c459c4cf616761e Mon Sep 17 00:00:00 2001 From: Joey Orlando Date: Fri, 14 Jul 2023 12:00:02 +0200 Subject: [PATCH] fix import mypy errors (#2407) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit # What this PR does Fix the following pre-existing `import` `mypy` errors (related to #2392): ```bash ❯ mypy . settings/prod_without_db.py:4: error: Cannot find implementation or library stub for module named "uwsgi" [import] engine/logging/formatters.py:2: error: Skipping analyzing "pythonjsonlogger": module is installed, but missing library stubs or py.typed marker [import] engine/logging/formatters.py:2: note: See https://mypy.readthedocs.io/en/stable/running_mypy.html#missing-imports engine/celery.py:7: error: Skipping analyzing "celery.utils.debug": module is installed, but missing library stubs or py.typed marker [import] Found 3 errors in 3 files (checked 595 source files) ``` ## Which issue(s) this PR fixes ## Checklist - [ ] Unit, integration, and e2e (if applicable) tests updated - [ ] Documentation added (or `pr:no public docs` PR label added if not required) - [ ] `CHANGELOG.md` updated (or `pr:no changelog` PR label added if not required) --- engine/pyproject.toml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/engine/pyproject.toml b/engine/pyproject.toml index 69c7daeb..b74b866f 100644 --- a/engine/pyproject.toml +++ b/engine/pyproject.toml @@ -32,7 +32,6 @@ disable_error_code = [ "call-arg", "call-overload", "has-type", - "import", "index", "misc", "name-defined", @@ -54,6 +53,7 @@ module = [ # we can slowly either start to add library stubs ourselves, or try and upgrade these libraries to see if # a newer version includes type stubs "anymail.*", + "celery.utils.debug", "debug_toolbar.*", "django_deprecate_fields.*", "django_sns_view.*", @@ -78,6 +78,7 @@ module = [ "twilio.*", "uwsgidecorators.*", "whitenoise.*", + "uwsgi.*", ] ignore_missing_imports = true