From nobody Tue Feb 10 05:46:12 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1654527679; cv=none; d=zohomail.com; s=zohoarc; b=Q4CsqVtD+pUpRlXr8vElnpMNe2A/cktFohDYjcjBL2aLCexxP/tmpxtfHPL8enhioR26BYZSfpCmSjnFTc+K8wtWotwS7w/DR1D9ZXUnxhXJ0+11B6Fk2NskE+YBHs8RzLuFJgihTd73TkLsHzL7s1TsHUh3gvF+een6GgGeOTw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1654527679; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=D7GE7wKxGfHrqOlyrA6BhbVBFiuUOVNOslDOFIi1kLg=; b=Mzb+MeHw88HvxP90iz7WGAylHAogE5j6zFmy9+j4f6EgipAbG178qgxSR8k3u9NYYjA1r/QMj0GXqAUT5O1Hj9WpyVJhspEsQMr2EbvCosHSdw8iTYPpFmY7eYhIf17IewD0pNGGj/kq98hknCWj1Ya959RTzL5WdVO715uYQWE= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1654527679707660.183406993264; Mon, 6 Jun 2022 08:01:19 -0700 (PDT) Received: from localhost ([::1]:41558 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nyEEI-0000Lp-AD for importer@patchew.org; Mon, 06 Jun 2022 11:01:18 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51118) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nyDrC-0002IJ-V1 for qemu-devel@nongnu.org; Mon, 06 Jun 2022 10:37:26 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:29813) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nyDrA-0000bp-8x for qemu-devel@nongnu.org; Mon, 06 Jun 2022 10:37:25 -0400 Received: from mail-wm1-f72.google.com (mail-wm1-f72.google.com [209.85.128.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-604-u2arxXBnOqKE-0syQWibAw-1; Mon, 06 Jun 2022 10:37:22 -0400 Received: by mail-wm1-f72.google.com with SMTP id k15-20020a7bc40f000000b0039c4b7f7d09so2042073wmi.8 for ; Mon, 06 Jun 2022 07:37:22 -0700 (PDT) Received: from goa-sendmail ([93.56.169.184]) by smtp.gmail.com with ESMTPSA id l14-20020adfe58e000000b002117ef160fbsm15179552wrm.21.2022.06.06.07.37.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Jun 2022 07:37:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1654526243; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=D7GE7wKxGfHrqOlyrA6BhbVBFiuUOVNOslDOFIi1kLg=; b=L4htsJbtA+Q/fvL0bKmnncPjkA2fu1yoCogFkD9lTw83qKFd8f6SWQ5R7wTRsB4MF80PUo 3FwZWgYgY+ZjW4G2dt9UwUQQagwHWANt9o3gwOHvzjE+Z8F0/YPO7HfxCo3tHY1JClqyXR cyOwdH5dZik9vkX/Vy7wBrsza2nbrfA= X-MC-Unique: u2arxXBnOqKE-0syQWibAw-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=D7GE7wKxGfHrqOlyrA6BhbVBFiuUOVNOslDOFIi1kLg=; b=yrCf8d+D3d3+Yo+m9RVajYe2D/OaNEW29k9PcG97Dt4NLW/8YZXzCmRLAaxp/l6etN DR/9XLKU7YEcCJ7AOAarY29+Q6YbFTDfP2xS1OVln4T6ZVnHl0TraFfuiki+fOUFIE1K cUxoLCEETKv+4eiBLP1+UzTGj8VMy9O1MTWCVXYWBlOIBMFVXVHc/ENRJdFMPgdu5l14 mawrt5C48HZAX01eXCj1WGAAfZGPCS+4yz5CRl6caa/bNvWnREL7JEjf337JigK7eviQ M8lLLVs8J3nLXafzkm0sAF+kBf7RE0jpxQlakKzp1OETtTcDeTgL09YHw1f0jw0QAx8I QcOw== X-Gm-Message-State: AOAM531PH/AXaDZM7IAvvh3jshqEu+NU4hsG/TrTqUlRixkRc6LVuz9k oinN7hCcjYQatV2vpL9f5C1NtnwTVjwGL8fv+yM9EijKqtmxDE7wcFJk5HFtPDyVnF2NMeA37RS BFlvP0EpLycKj0dsTEpG99hg2DqWIFZnohGVgwYbeR0sbSdnNsc8DQ1Ttu8j72t9mFno= X-Received: by 2002:a5d:498f:0:b0:215:4d13:477e with SMTP id r15-20020a5d498f000000b002154d13477emr14969372wrq.155.1654526240900; Mon, 06 Jun 2022 07:37:20 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzITWb9SD9O5mYoBZHn8wf9NkkK4WNMVHcyglNFnyyYQQMbphRbnWAuBUpeMSyx/rtYvgrHWA== X-Received: by 2002:a5d:498f:0:b0:215:4d13:477e with SMTP id r15-20020a5d498f000000b002154d13477emr14969330wrq.155.1654526240439; Mon, 06 Jun 2022 07:37:20 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: John Snow Subject: [PULL 18/29] python: update for mypy 0.950 Date: Mon, 6 Jun 2022 16:36:33 +0200 Message-Id: <20220606143644.1151112-19-pbonzini@redhat.com> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220606143644.1151112-1-pbonzini@redhat.com> References: <20220606143644.1151112-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -21 X-Spam_score: -2.2 X-Spam_bar: -- X-Spam_report: (-2.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.082, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1654527680922100001 Content-Type: text/plain; charset="utf-8" From: John Snow typeshed (included in mypy) recently updated to improve the typing for WriteTransport objects. I was working around this, but now there's a version where I shouldn't work around it. Unfortunately this creates some minor ugliness if I want to support both pre- and post-0.950 versions. For now, for my sanity, just disable the unused-ignores warning. Signed-off-by: John Snow Reviewed-by: Paolo Bonzini Message-Id: <20220526000921.1581503-2-jsnow@redhat.com> Signed-off-by: Paolo Bonzini --- python/qemu/qmp/util.py | 4 +++- python/setup.cfg | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/python/qemu/qmp/util.py b/python/qemu/qmp/util.py index eaa5fc7d5f..ca6225e9cd 100644 --- a/python/qemu/qmp/util.py +++ b/python/qemu/qmp/util.py @@ -40,7 +40,9 @@ async def flush(writer: asyncio.StreamWriter) -> None: drain. The flow control limits are restored after the call is completed. """ - transport =3D cast(asyncio.WriteTransport, writer.transport) + transport =3D cast( # type: ignore[redundant-cast] + asyncio.WriteTransport, writer.transport + ) =20 # https://github.com/python/typeshed/issues/5779 low, high =3D transport.get_write_buffer_limits() # type: ignore diff --git a/python/setup.cfg b/python/setup.cfg index e877ea5647..c2c61c7519 100644 --- a/python/setup.cfg +++ b/python/setup.cfg @@ -79,6 +79,7 @@ strict =3D True python_version =3D 3.6 warn_unused_configs =3D True namespace_packages =3D True +warn_unused_ignores =3D False =20 [mypy-qemu.utils.qom_fuse] # fusepy has no type stubs: --=20 2.36.1