From 54f9f9feb0e5ff954b3f8160d650f941c02bd8f8 Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Thu, 3 Feb 2022 21:16:46 -0800 Subject: temporarily disable mypy checks on web_config.py --- python/fatcat_web/__init__.py | 2 +- python/fatcat_web/web_config.py | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) (limited to 'python') diff --git a/python/fatcat_web/__init__.py b/python/fatcat_web/__init__.py index 70f8ad4a..9877d98e 100644 --- a/python/fatcat_web/__init__.py +++ b/python/fatcat_web/__init__.py @@ -17,7 +17,7 @@ from loginpass import GitHub, Gitlab, ORCiD, create_flask_blueprint from sentry_sdk.integrations.flask import FlaskIntegration from fatcat_web.types import AnyResponse -from fatcat_web.web_config import Config +from fatcat_web.web_config import Config # type: ignore toolbar = DebugToolbarExtension() diff --git a/python/fatcat_web/web_config.py b/python/fatcat_web/web_config.py index d58214cc..fb3b55ab 100644 --- a/python/fatcat_web/web_config.py +++ b/python/fatcat_web/web_config.py @@ -1,3 +1,8 @@ +# type: ignore +# TODO: we are ignoring mypy type checks on this file because of all the +# 'os.environ' usage, which is causing trouble with newer mypy. Should resolve +# (annotate?) and re-enable type checking here + """ Default configuration for fatcat web interface (Flask application). @@ -8,6 +13,7 @@ This config is *only* for the web interface, *not* for any of the workers or import scripts. """ + import os import subprocess from typing import Union @@ -43,7 +49,7 @@ def test_bool_str() -> None: assert bool_str("FALSE") is False -def fetch_git_sha(): +def fetch_git_sha() -> str: """ Get short commit id, runnable anywhere within a git repository. """ -- cgit v1.2.3