Skip to content

Commit

Permalink
Fix linter issues
Browse files Browse the repository at this point in the history
  • Loading branch information
drew2a committed Jul 4, 2023
1 parent 98a0cd6 commit 2ebe49e
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit 2ebe49e

Please sign in to comment.