linux-kselftest.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: Brendan Higgins <brendanhiggins@google.com>,
	David Gow <davidgow@google.com>
Cc: linux-kselftest@vger.kernel.org, kunit-dev@googlegroups.com,
	Johannes Berg <johannes.berg@intel.com>
Subject: [PATCH] kunit: tool: fix type annotation for IO
Date: Wed, 15 Mar 2023 10:50:55 +0100	[thread overview]
Message-ID: <20230315105055.9b2be0153625.I7a2cb99b95dff216c0feed4604255275e0b156a7@changeid> (raw)

From: Johannes Berg <johannes.berg@intel.com>

This should be IO[str], since we use it for printing strings.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
---
 tools/testing/kunit/kunit_printer.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/testing/kunit/kunit_printer.py b/tools/testing/kunit/kunit_printer.py
index 5f1cc55ecdf5..015adf87dc2c 100644
--- a/tools/testing/kunit/kunit_printer.py
+++ b/tools/testing/kunit/kunit_printer.py
@@ -15,7 +15,7 @@ _RESET = '\033[0;0m'
 class Printer:
 	"""Wraps a file object, providing utilities for coloring output, etc."""
 
-	def __init__(self, output: typing.IO):
+	def __init__(self, output: typing.IO[str]):
 		self._output = output
 		self._use_color = output.isatty()
 
-- 
2.39.2


             reply	other threads:[~2023-03-15  9:52 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-15  9:50 Johannes Berg [this message]
2023-03-16  6:02 ` [PATCH] kunit: tool: fix type annotation for IO Daniel Latypov
2023-03-16  7:42   ` Johannes Berg
2023-03-16 17:35     ` Daniel Latypov
2023-03-16 17:43       ` Johannes Berg
2023-03-16 17:58         ` Daniel Latypov
2023-03-16 21:03           ` Johannes Berg
2023-03-16 21:30             ` Daniel Latypov
2023-03-16 21:43               ` Johannes Berg
2023-03-16 22:10               ` Daniel Latypov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230315105055.9b2be0153625.I7a2cb99b95dff216c0feed4604255275e0b156a7@changeid \
    --to=johannes@sipsolutions.net \
    --cc=brendanhiggins@google.com \
    --cc=davidgow@google.com \
    --cc=johannes.berg@intel.com \
    --cc=kunit-dev@googlegroups.com \
    --cc=linux-kselftest@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).