diff --git a/src/tribler/core/components/libtorrent/restapi/tests/test_torrentinfo_endpoint.py b/src/tribler/core/components/libtorrent/restapi/tests/test_torrentinfo_endpoint.py index 85956c4bd1a..4bda6f5e48b 100644 --- a/src/tribler/core/components/libtorrent/restapi/tests/test_torrentinfo_endpoint.py +++ b/src/tribler/core/components/libtorrent/restapi/tests/test_torrentinfo_endpoint.py @@ -114,7 +114,7 @@ async def mock_http_query(*_): tdef = TorrentDef.load_from_memory(torrent_data) metainfo_dict = tdef_to_metadata_dict(TorrentDef.load_from_memory(torrent_data)) - async def get_metainfo(infohash, timeout=20, hops=None, url=None): + async def get_metainfo(infohash, timeout=20, hops=None, url=None): # pylint: disable=unused-argument if hops is not None: hops_list.append(hops) assert url diff --git a/src/tribler/core/components/metadata_store/tests/test_channel_download.py b/src/tribler/core/components/metadata_store/tests/test_channel_download.py index b5e51111319..6418b9139c9 100644 --- a/src/tribler/core/components/metadata_store/tests/test_channel_download.py +++ b/src/tribler/core/components/metadata_store/tests/test_channel_download.py @@ -20,13 +20,15 @@ CHANNEL_METADATA_UPDATED = CHANNEL_DIR / 'channel_upd.mdblob' +# pylint: redefined-outer-name + @pytest.fixture def channel_tdef(): return TorrentDef.load(TESTS_DATA_DIR / 'sample_channel' / 'channel_upd.torrent') @pytest.fixture -async def channel_seeder(channel_tdef, tmp_path_factory): # pylint: disable=unused-argument, redefined-outer-name +async def channel_seeder(channel_tdef, tmp_path_factory): # pylint: disable=unused-argument config = LibtorrentSettings() config.dht = False config.upnp = False diff --git a/src/tribler/core/components/restapi/rest/tests/test_create_torrent_endpoint.py b/src/tribler/core/components/restapi/rest/tests/test_create_torrent_endpoint.py index 801a68cc6a1..51c0cd26028 100644 --- a/src/tribler/core/components/restapi/rest/tests/test_create_torrent_endpoint.py +++ b/src/tribler/core/components/restapi/rest/tests/test_create_torrent_endpoint.py @@ -11,6 +11,9 @@ from tribler.core.tests.tools.common import TESTS_DATA_DIR +# pylint: redefined-outer-name + + @pytest.fixture async def rest_api(aiohttp_client, download_manager): endpoint = CreateTorrentEndpoint(download_manager) diff --git a/src/tribler/core/components/restapi/rest/tests/test_shutdown_endpoint.py b/src/tribler/core/components/restapi/rest/tests/test_shutdown_endpoint.py index 0c7db207b52..c2b7efd3896 100644 --- a/src/tribler/core/components/restapi/rest/tests/test_shutdown_endpoint.py +++ b/src/tribler/core/components/restapi/rest/tests/test_shutdown_endpoint.py @@ -8,6 +8,9 @@ from tribler.core.components.restapi.rest.shutdown_endpoint import ShutdownEndpoint +# pylint: redefined-outer-name + + @pytest.fixture async def endpoint(): endpoint = ShutdownEndpoint(Mock()) diff --git a/src/tribler/core/components/restapi/rest/tests/test_statistics_endpoint.py b/src/tribler/core/components/restapi/rest/tests/test_statistics_endpoint.py index cd14addb3c4..7fdae9307bd 100644 --- a/src/tribler/core/components/restapi/rest/tests/test_statistics_endpoint.py +++ b/src/tribler/core/components/restapi/rest/tests/test_statistics_endpoint.py @@ -12,6 +12,9 @@ from tribler.core.components.restapi.rest.statistics_endpoint import StatisticsEndpoint +# pylint: redefined-outer-name + + @pytest.fixture async def endpoint(metadata_store): ipv8 = MockIPv8("low", BandwidthAccountingCommunity, database=Mock(), diff --git a/src/tribler/core/components/restapi/rest/tests/test_trustview_endpoint.py b/src/tribler/core/components/restapi/rest/tests/test_trustview_endpoint.py index 016b8f336ee..0ef559094c3 100644 --- a/src/tribler/core/components/restapi/rest/tests/test_trustview_endpoint.py +++ b/src/tribler/core/components/restapi/rest/tests/test_trustview_endpoint.py @@ -16,8 +16,10 @@ from tribler.core.utilities.utilities import MEMORY_DB +# pylint: redefined-outer-name + @pytest.fixture -async def endpoint(bandwidth_db): # pylint: disable=W0621 +async def endpoint(bandwidth_db): endpoint = TrustViewEndpoint(bandwidth_db) yield endpoint await endpoint.shutdown()