From 93b1fa09d52970b449b36b8649b2831dad08604e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Sat, 30 Sep 2023 10:14:56 +0200 Subject: [PATCH] nixos/test-driver: disable typecheck for dependencies where don't have typing --- nixos/lib/test-driver/pyproject.toml | 9 +++++++++ nixos/lib/test-driver/test_driver/logger.py | 3 +++ 2 files changed, 12 insertions(+) diff --git a/nixos/lib/test-driver/pyproject.toml b/nixos/lib/test-driver/pyproject.toml index 68921bc9f850..8638f14dfdae 100644 --- a/nixos/lib/test-driver/pyproject.toml +++ b/nixos/lib/test-driver/pyproject.toml @@ -22,6 +22,15 @@ line-length = 88 select = ["E", "F", "I", "U", "N"] ignore = ["E501"] +# xxx: we can import https://pypi.org/project/types-colorama/ here +[[tool.mypy.overrides]] +module = "colorama.*" +ignore_missing_imports = true + +[[tool.mypy.overrides]] +module = "ptpython.*" +ignore_missing_imports = true + [tool.black] line-length = 88 target-version = ['py39'] diff --git a/nixos/lib/test-driver/test_driver/logger.py b/nixos/lib/test-driver/test_driver/logger.py index e6182ff7c761..ea14c50dc517 100644 --- a/nixos/lib/test-driver/test_driver/logger.py +++ b/nixos/lib/test-driver/test_driver/logger.py @@ -1,3 +1,6 @@ +# mypy: disable-error-code="no-untyped-call" +# drop the above line when mypy is upgraded to include +# https://github.com/python/typeshed/commit/49b717ca52bf0781a538b04c0d76a5513f7119b8 from colorama import Style, Fore from contextlib import contextmanager from typing import Any, Dict, Iterator