From eb3eab86bc14ef0ed511f8545833e4da6cee721a Mon Sep 17 00:00:00 2001 From: Bertrand Bonnefoy-Claudet Date: Sun, 12 Apr 2020 16:36:46 +0200 Subject: [PATCH] Fix type checking with latest Mypy (0.770) --- src/dotenv/main.py | 1 + tox.ini | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/dotenv/main.py b/src/dotenv/main.py index 93d617d6..68ee02a0 100644 --- a/src/dotenv/main.py +++ b/src/dotenv/main.py @@ -275,6 +275,7 @@ def _is_interactive(): current_file = __file__ while frame.f_code.co_filename == current_file: + assert frame.f_back is not None frame = frame.f_back frame_filename = frame.f_code.co_filename path = os.path.dirname(os.path.abspath(frame_filename)) diff --git a/tox.ini b/tox.ini index 0c69795c..a5dc050b 100644 --- a/tox.ini +++ b/tox.ini @@ -22,7 +22,7 @@ commands = skip_install = true deps = flake8 - mypy==0.761 + mypy commands = flake8 src tests mypy --python-version=3.8 src tests