From 6e54962fe47a5b262e9fd19db4c328dbbf215b1b Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Tue, 8 Nov 2022 17:02:30 +0100 Subject: pylint: Remove now-unneeded suppressions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The recent pytest 7.2 upgrade leads pylint to complain: ************* Module unit.browser.test_qutescheme tests/unit/browser/test_qutescheme.py:26:0: I0021: Useless suppression of 'no-name-in-module' (useless-suppression) tests/unit/browser/test_qutescheme.py:226:0: I0021: Useless suppression of 'no-member' (useless-suppression) ************* Module helpers.fixtures tests/helpers/fixtures.py:39:0: I0021: Useless suppression of 'no-name-in-module' (useless-suppression) tests/helpers/fixtures.py:639:0: I0021: Useless suppression of 'no-member' (useless-suppression) possibly due to it not being able to infer 'py' anymore with the weird shenanigans pytest does now? Also, what weird glitch in the matrix is it that those just happen to be on lines [2]26 and [6]39 for *both* files? 🤯 --- tests/helpers/fixtures.py | 4 ++-- tests/unit/browser/test_qutescheme.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/helpers/fixtures.py b/tests/helpers/fixtures.py index c36bc98cb..7a8931eac 100644 --- a/tests/helpers/fixtures.py +++ b/tests/helpers/fixtures.py @@ -36,7 +36,7 @@ import os.path import dataclasses import pytest -import py.path # pylint: disable=no-name-in-module +import py.path from PyQt5.QtCore import QSize, Qt from PyQt5.QtWidgets import QWidget, QHBoxLayout, QVBoxLayout from PyQt5.QtNetwork import QNetworkCookieJar @@ -636,7 +636,7 @@ def redirect_webengine_data(data_tmpdir, monkeypatch): def short_tmpdir(): """A short temporary directory for a XDG_RUNTIME_DIR.""" with tempfile.TemporaryDirectory() as tdir: - yield py.path.local(tdir) # pylint: disable=no-member + yield py.path.local(tdir) class ModelValidator: diff --git a/tests/unit/browser/test_qutescheme.py b/tests/unit/browser/test_qutescheme.py index 45474102d..e4aa51243 100644 --- a/tests/unit/browser/test_qutescheme.py +++ b/tests/unit/browser/test_qutescheme.py @@ -23,7 +23,7 @@ import os import time import logging -import py.path # pylint: disable=no-name-in-module +import py.path from PyQt5.QtCore import QUrl, QUrlQuery import pytest @@ -223,7 +223,7 @@ class TestPDFJSHandler: @pytest.fixture def download_tmpdir(self): tdir = downloads.temp_download_manager.get_tmpdir() - yield py.path.local(tdir.name) # pylint: disable=no-member + yield py.path.local(tdir.name) tdir.cleanup() def test_existing_resource(self): -- cgit v1.2.3-54-g00ecf