cleanup mypy usage
diff --git a/.landscape.yml b/.landscape.yml
deleted file mode 100644
index b6a45ed71a..0000000000
--- a/.landscape.yml
+++ /dev/null
@@ -1,20 +0,0 @@
-ignore-paths:
-  - docs
-  - examples
-  - mitmproxy/contrib
-  - web
-max-line-length: 140
-pylint:
-  options:
-    dummy-variables-rgx: _$|.+_$|dummy_.+
-  disable:
-    - missing-docstring
-    - protected-access
-    - too-few-public-methods
-    - too-many-arguments
-    - too-many-instance-attributes
-    - too-many-locals
-    - too-many-public-methods
-    - too-many-return-statements
-    - too-many-statements
-    - unpacking-non-sequence
diff --git a/examples/complex/change_upstream_proxy.py b/examples/complex/change_upstream_proxy.py
index 089a9df58a..a0e7e57288 100644
--- a/examples/complex/change_upstream_proxy.py
+++ b/examples/complex/change_upstream_proxy.py
@@ -24,4 +24,4 @@ def request(flow: http.HTTPFlow) -> None:
         return
     address = proxy_address(flow)
     if flow.live:
-        flow.live.change_upstream_proxy_server(address)
+        flow.live.change_upstream_proxy_server(address)  # type: ignore
diff --git a/examples/complex/sslstrip.py b/examples/complex/sslstrip.py
index 69b9ea9ed7..8b90421677 100644
--- a/examples/complex/sslstrip.py
+++ b/examples/complex/sslstrip.py
@@ -31,6 +31,7 @@ def request(flow: http.HTTPFlow) -> None:
 
 
 def response(flow: http.HTTPFlow) -> None:
+    assert flow.response
     flow.response.headers.pop('Strict-Transport-Security', None)
     flow.response.headers.pop('Public-Key-Pins', None)
 
diff --git a/examples/complex/xss_scanner.py b/examples/complex/xss_scanner.py
index d5f4aaab2f..2a45511a8c 100755
--- a/examples/complex/xss_scanner.py
+++ b/examples/complex/xss_scanner.py
@@ -395,8 +395,10 @@ def handle_starttag(self, tag, attrs):
 
 # response is mitmproxy's entry point
 def response(flow: http.HTTPFlow) -> None:
+    assert flow.response
     cookies_dict = get_cookies(flow)
     resp = flow.response.get_text(strict=False)
+    assert resp
     # Example: http://xss.guru/unclaimedScriptTag.html
     find_unclaimed_URLs(resp, flow.request.url)
     results = test_end_of_URL_injection(resp, flow.request.url, cookies_dict)
diff --git a/release/cibuild.py b/release/cibuild.py
index 8206063988..799c79294c 100755
--- a/release/cibuild.py
+++ b/release/cibuild.py
@@ -190,7 +190,9 @@ def check_version(self) -> None:
         """
         with open(pathlib.Path(self.root_dir) / "mitmproxy" / "version.py") as f:
             contents = f.read()
-        version = re.search(r'^VERSION = "(.+?)"', contents, re.M).group(1)
+        match = re.search(r'^VERSION = "(.+?)"', contents, re.M)
+        assert match
+        version = match.group(1)
 
         if self.is_prod_release:
             # For production releases, we require strict version equality
diff --git a/setup.cfg b/setup.cfg
index e7643b087f..a2c49f48df 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -19,12 +19,18 @@ exclude_lines =
     pragma: no cover
     raise NotImplementedError()
 
+[mypy]
+ignore_missing_imports = True
+
 [mypy-mitmproxy.contrib.*]
 ignore_errors = True
 
 [mypy-tornado.*]
 ignore_errors = True
 
+[mypy-test.*]
+ignore_errors = True
+
 [tool:full_coverage]
 exclude =
     mitmproxy/proxy/protocol/base.py
diff --git a/setup.py b/setup.py
index 9343dd997c..fb23fd69a9 100644
--- a/setup.py
+++ b/setup.py
@@ -13,7 +13,9 @@
     long_description = f.read()
 
 with open(os.path.join(here, "mitmproxy", "version.py")) as f:
-    VERSION = re.search(r'VERSION = "(.+?)"', f.read()).group(1)
+    match = re.search(r'VERSION = "(.+?)"', f.read())
+    assert match
+    VERSION = match.group(1)
 
 setup(
     name="mitmproxy",
diff --git a/tox.ini b/tox.ini
index 8c8fbaa21c..3df2bd4065 100644
--- a/tox.ini
+++ b/tox.ini
@@ -31,8 +31,7 @@ commands =
   flake8 --jobs 8 mitmproxy pathod examples test release
   python ./test/filename_matching.py
   rstcheck README.rst
-  mypy --ignore-missing-imports ./mitmproxy ./pathod
-  mypy --ignore-missing-imports --follow-imports=skip  ./examples/simple/ ./examples/pathod/ ./examples/complex/
+  mypy .
 
 [testenv:individual_coverage]
 deps =
