diff mbox series

kunit: tool: Fix a python tuple typing error

Message ID 20210223054930.2345555-1-davidgow@google.com
State Accepted
Commit 7421b1a4d10c633ca5f14c8236d3e2c1de07e52b
Headers show
Series kunit: tool: Fix a python tuple typing error | expand

Commit Message

David Gow Feb. 23, 2021, 5:49 a.m. UTC
The first argument to namedtuple() should match the name of the type,
which wasn't the case for KconfigEntryBase.

Fixing this is enough to make mypy show no python typing errors again.

Fixes 97752c39bd ("kunit: kunit_tool: Allow .kunitconfig to disable config items")
Signed-off-by: David Gow <davidgow@google.com>
---
 tools/testing/kunit/kunit_config.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Brendan Higgins Feb. 26, 2021, 9:15 p.m. UTC | #1
On Mon, Feb 22, 2021 at 9:49 PM 'David Gow' via KUnit Development
<kunit-dev@googlegroups.com> wrote:
>

> The first argument to namedtuple() should match the name of the type,

> which wasn't the case for KconfigEntryBase.

>

> Fixing this is enough to make mypy show no python typing errors again.

>

> Fixes 97752c39bd ("kunit: kunit_tool: Allow .kunitconfig to disable config items")

> Signed-off-by: David Gow <davidgow@google.com>


Acked-by: Brendan Higgins <brendanhiggins@google.com>
diff mbox series

Patch

diff --git a/tools/testing/kunit/kunit_config.py b/tools/testing/kunit/kunit_config.py
index 0b550cbd667d..1e2683dcc0e7 100644
--- a/tools/testing/kunit/kunit_config.py
+++ b/tools/testing/kunit/kunit_config.py
@@ -13,7 +13,7 @@  from typing import List, Set
 CONFIG_IS_NOT_SET_PATTERN = r'^# CONFIG_(\w+) is not set$'
 CONFIG_PATTERN = r'^CONFIG_(\w+)=(\S+|".*")$'
 
-KconfigEntryBase = collections.namedtuple('KconfigEntry', ['name', 'value'])
+KconfigEntryBase = collections.namedtuple('KconfigEntryBase', ['name', 'value'])
 
 class KconfigEntry(KconfigEntryBase):