From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 55A8FC77B7C for ; Mon, 1 May 2023 19:10:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229688AbjEATKo (ORCPT ); Mon, 1 May 2023 15:10:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45858 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232101AbjEATKn (ORCPT ); Mon, 1 May 2023 15:10:43 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6FD921FC0; Mon, 1 May 2023 12:10:42 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 09F5B618AC; Mon, 1 May 2023 19:10:42 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id ABC40C433D2; Mon, 1 May 2023 19:10:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1682968241; bh=7wA5MD8Ul6eRk6o5es1/yKxJrO4V6BCjnRixIYeEAH4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=j7pkR9OU+t1cf869c4V7a2oISoGQAT53bNvhWLJU+6ypkVtMDi06q3P9Uow1MnSkM O52pydRtx/rKTnnhHrzaiwXufppnjN04ezUfGxlyA+K/8i8+AaQBENv7SBOTEyFVlz U3yoTkb14H4jQ/9UqMvWJ60n4LdIZ+NMRWOZ3S4h0ky6oqKt0kZ71gX2Z9/NQ6te2k IYkV5WRuwBbyJLlhFtGYnE4hcuIshLMOJ6/TLyA0uijhZkMs6hQMsd50MwEPQPfyiT IsxgZrMislen5Oe6a/wDKyafq/lzH8batbx8LWF8CPqeBycng9Zho5Z87aTNHK8pGc cJgSctxNPr4YQ== From: SeongJae Park To: Daniel Latypov Cc: brendanhiggins@google.com, davidgow@google.com, rmoar@google.com, linux-kernel@vger.kernel.org, kunit-dev@googlegroups.com, linux-kselftest@vger.kernel.org, skhan@linuxfoundation.org, johannes@sipsolutions.net, SeongJae Park Subject: Re: [PATCH] kunit: tool: undo type subscripts for subprocess.Popen Date: Mon, 1 May 2023 19:10:39 +0000 Message-Id: <20230501191039.140496-1-sj@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230501181610.2617032-1-dlatypov@google.com> References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kselftest@vger.kernel.org On Mon, 1 May 2023 11:16:10 -0700 Daniel Latypov wrote: > Writing `subprocess.Popen[str]` requires python 3.9+. > kunit.py has an assertion that the python version is 3.7+, so we should > try to stay backwards compatible. > > This conflicts a bit with commit 1da2e6220e11 ("kunit: tool: fix > pre-existing `mypy --strict` errors and update run_checks.py"), since > mypy complains like so > > kunit_kernel.py:95: error: Missing type parameters for generic type "Popen" [type-arg] > > Note: `mypy --strict --python-version 3.7` does not work. > > We could annotate each file with comments like > `# mypy: disable-error-code="type-arg" > but then we might still get nudged to break back-compat in other files. > > This patch adds a `mypy.ini` file since it seems like the only way to > disable specific error codes for all our files. > > Note: run_checks.py doesn't need to specify `--config_file mypy.ini`, > but I think being explicit is better, particularly since most kernel > devs won't be familiar with how mypy works. Thank you for fast fix! > > Fixes: 695e26030858 ("kunit: tool: add subscripts for type annotations where appropriate") > Reported-by: SeongJae Park > Link: https://lore.kernel.org/linux-kselftest/20230501171520.138753-1-sj@kernel.org > Signed-off-by: Daniel Latypov Tested-by: SeongJae Park Thanks, SJ [...]