Skip to content

Commit a7dfdbe

Browse files
committed
chore(linting): remove pylint ignores
We no longer check the code with pylint.
1 parent d5a8518 commit a7dfdbe

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

69 files changed

+17
-203
lines changed

cardano_node_tests/cluster_management/cluster_getter.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
"""Functionality for obtaining and setting up a cluster instance."""
22

3-
# pylint: disable=abstract-class-instantiated
43
import dataclasses
54
import logging
65
import os
@@ -111,7 +110,6 @@ def _respin(self, start_cmd: str = "", stop_cmd: str = "") -> bool: # noqa: C90
111110
112111
Not called under global lock!
113112
"""
114-
# pylint: disable=too-many-branches,too-many-statements
115113
cluster_running_file = self.instance_dir / common.CLUSTER_RUNNING_FILE
116114

117115
# Don't respin cluster if it was started outside of test framework
@@ -735,7 +733,6 @@ def get_cluster_instance( # noqa: C901
735733
("singleton" tests).
736734
start_cmd: Custom command to start the cluster.
737735
"""
738-
# pylint: disable=too-many-statements,too-many-branches
739736
assert not isinstance(lock_resources, str), "`lock_resources` can't be single string"
740737
assert not isinstance(use_resources, str), "`use_resources` can't be single string"
741738

@@ -800,7 +797,6 @@ def get_cluster_instance( # noqa: C901
800797

801798
# Sleep for a while to avoid too many checks in a short time
802799
_xdist_sleep(random.uniform(0.6, 1.2) * cget_status.sleep_delay)
803-
# pylint: disable=consider-using-max-builtin
804800
cget_status.sleep_delay = max(cget_status.sleep_delay, 1)
805801

806802
# Nothing time consuming can go under this lock as all other workers will need to wait

cardano_node_tests/pytest_plugins/xdist_scheduler.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,6 @@ class OneLongScheduling(scheduler.LoadScopeScheduling):
4545
}
4646
"""
4747

48-
# pylint: disable=abstract-method
49-
5048
def _split_scope(self, nodeid: str) -> str:
5149
"""Determine the scope (grouping) of a nodeid.
5250

cardano_node_tests/tests/common.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,6 @@
134134

135135

136136
def hypothesis_settings(max_examples: int = 100) -> tp.Any:
137-
# pylint: disable=import-outside-toplevel
138137
import hypothesis
139138

140139
return hypothesis.settings(

cardano_node_tests/tests/conftest.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# pylint: disable=abstract-class-instantiated
21
import json
32
import logging
43
import os
@@ -330,7 +329,6 @@ def session_autouse(
330329
testenv_setup_teardown: tp.Any,
331330
) -> None:
332331
"""Autouse session fixtures that are required for session setup and teardown."""
333-
# pylint: disable=unused-argument,unnecessary-pass
334332

335333

336334
@pytest.fixture(scope="module")
@@ -369,7 +367,7 @@ def cluster_manager(
369367
) -> tp.Generator[cluster_management.ClusterManager, None, None]:
370368
"""Return instance of `cluster_management.ClusterManager`."""
371369
# Hide from traceback to make logs errors more readable
372-
__tracebackhide__ = True # pylint: disable=unused-variable
370+
__tracebackhide__ = True
373371

374372
cluster_manager_obj = cluster_management.ClusterManager(
375373
worker_id=worker_id, pytest_config=request.config
@@ -413,7 +411,6 @@ def function_autouse(
413411
respin_on_large_db: tp.Generator[None, None, None],
414412
) -> None:
415413
"""Autouse function fixtures that are required for each test setup and teardown."""
416-
# pylint: disable=unused-argument,unnecessary-pass
417414

418415

419416
@pytest.fixture

cardano_node_tests/tests/kes.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ def check_kes_period_info_result( # noqa: C901
3535
3636
When `pool_num` is specified, prometheus metrics are checked.
3737
"""
38-
# pylint: disable=too-many-branches
3938
output_scenario = "unknown"
4039
errors = []
4140

cardano_node_tests/tests/test_blocks.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@ def test_pool_blocks( # noqa: C901
5353
* compare log records with ledger state dump
5454
* (optional) check minted blocks in db-sync
5555
"""
56-
# pylint: disable=unused-argument
5756
cluster, pool_name = cluster_use_pool
5857
pool_short_name = f"{pool_name.replace('node-', '')}"
5958
temp_template = common.get_test_id(cluster)
@@ -213,7 +212,6 @@ def test_unstable_stake_distribution(
213212
214213
Expect failure.
215214
"""
216-
# pylint: disable=unused-argument
217215
common.get_test_id(cluster)
218216

219217
pool_name = cluster_management.Resources.POOL3
@@ -280,7 +278,6 @@ def test_block_production( # noqa: C901
280278
- each epoch save block production data to sqlite db
281279
- transfer funds between multiple addresses to create activity
282280
"""
283-
# pylint: disable=too-many-statements
284281
temp_template = common.get_test_id(cluster)
285282
rand = clusterlib.get_rand_str(5)
286283
num_epochs = int(os.environ.get("BLOCK_PRODUCTION_EPOCHS") or 50)

cardano_node_tests/tests/test_cli.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -955,7 +955,6 @@ def _check_stake_snapshot( # noqa: C901
955955
option: str,
956956
temp_template: str,
957957
):
958-
# pylint: disable=too-many-branches,too-many-statements
959958
pool_ids = cluster_obj.g_query.get_stake_pools()
960959
if not pool_ids:
961960
pytest.skip("No stake pools are available.")
@@ -1264,7 +1263,6 @@ def test_ping_localhost(
12641263
cluster: clusterlib.ClusterLib,
12651264
):
12661265
"""Test `cardano-cli ping` on local node using host and port."""
1267-
# pylint: disable=unused-argument
12681266
common.get_test_id(cluster)
12691267

12701268
count = 5
@@ -1309,7 +1307,6 @@ def test_ping_unix_socket(
13091307
cluster: clusterlib.ClusterLib,
13101308
):
13111309
"""Test `cardano-cli ping` on local node using unix socket."""
1312-
# pylint: disable=unused-argument
13131310
common.get_test_id(cluster)
13141311
count = 5
13151312
ignore_file_id = "ping_unix_socket"
@@ -1374,7 +1371,6 @@ def test_slot_number(
13741371
cluster: clusterlib.ClusterLib,
13751372
):
13761373
"""Test `query slot-number`."""
1377-
# pylint: disable=unused-argument
13781374
common.get_test_id(cluster)
13791375

13801376
timestamp = datetime.datetime.now(datetime.timezone.utc)
@@ -1398,7 +1394,6 @@ def test_slot_number_invalid_format(
13981394
13991395
Expect failure.
14001396
"""
1401-
# pylint: disable=unused-argument
14021397
common.get_test_id(cluster)
14031398

14041399
timestamp_str = datetime.datetime.now(datetime.timezone.utc).strftime("%Y-%m-%d")
@@ -1421,7 +1416,6 @@ def test_slot_number_out_of_range(
14211416
14221417
Expect failure.
14231418
"""
1424-
# pylint: disable=unused-argument
14251419
common.get_test_id(cluster)
14261420

14271421
now = datetime.datetime.now(datetime.timezone.utc)

cardano_node_tests/tests/test_configuration.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
"""Tests for node configuration."""
22

3-
# pylint: disable=abstract-class-instantiated
43
import json
54
import logging
65
import pathlib as pl

cardano_node_tests/tests/test_dbsync.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,6 @@ def test_table_names(self, cluster: clusterlib.ClusterLib):
121121
@pytest.mark.smoke
122122
def test_blocks(self, cluster: clusterlib.ClusterLib): # noqa: C901
123123
"""Check expected values in the `block` table in db-sync."""
124-
# pylint: disable=too-many-branches
125124
common.get_test_id(cluster)
126125

127126
tip = cluster.g_query.get_tip()

cardano_node_tests/tests/test_env_network_id.py

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,6 @@ def skip_on_no_env(
6868
set_network_id_env: None, # noqa: ARG001
6969
) -> None:
7070
"""Skip test if `CARDANO_NODE_NETWORK_ID` is not available."""
71-
# pylint: disable=unused-argument
7271
try:
7372
cluster.g_query.get_tip()
7473
except clusterlib.CLIError as exc:
@@ -100,7 +99,6 @@ def payment_addrs(
10099
cluster: clusterlib.ClusterLib,
101100
) -> list[clusterlib.AddressRecord]:
102101
"""Create new payment addresses."""
103-
# pylint: disable=unused-argument
104102
addrs = common.get_payment_addrs(
105103
name_template=common.get_test_id(cluster),
106104
cluster_manager=cluster_manager,
@@ -126,7 +124,6 @@ def test_query_protocol_state(
126124
cluster: clusterlib.ClusterLib,
127125
):
128126
"""Test `query protocol-state`."""
129-
# pylint: disable=unused-argument
130127
common.get_test_id(cluster)
131128
state = cluster.g_query.get_protocol_state()
132129
assert "lastSlot" in state
@@ -141,7 +138,6 @@ def test_query_stake_distribution(
141138
cluster: clusterlib.ClusterLib,
142139
):
143140
"""Test `query stake-distribution`."""
144-
# pylint: disable=unused-argument
145141
common.get_test_id(cluster)
146142
distrib = cluster.g_query.get_stake_distribution()
147143
assert next(iter(distrib)).startswith("pool")
@@ -156,7 +152,6 @@ def test_query_protocol_params(
156152
cluster: clusterlib.ClusterLib,
157153
):
158154
"""Test `query protocol-parameters`."""
159-
# pylint: disable=unused-argument
160155
common.get_test_id(cluster)
161156
protocol_params = cluster.g_query.get_protocol_params()
162157
assert "protocolVersion" in protocol_params
@@ -171,7 +166,6 @@ def test_query_pool_state(
171166
cluster: clusterlib.ClusterLib,
172167
):
173168
"""Test `query pool-state`."""
174-
# pylint: disable=unused-argument
175169
common.get_test_id(cluster)
176170
cluster.g_query.get_pool_state(stake_pool_id=POOL_ID)
177171

@@ -185,7 +179,6 @@ def test_query_stake_addr_info(
185179
cluster: clusterlib.ClusterLib,
186180
):
187181
"""Test `query stake-address-info`."""
188-
# pylint: disable=unused-argument
189182
common.get_test_id(cluster)
190183
cluster.g_query.get_stake_addr_info(stake_addr=STAKE_ADDR)
191184

@@ -207,7 +200,6 @@ def test_build_transfer_funds(
207200
* send funds from 1 source address to 1 destination address
208201
* check expected balances for both source and destination addresses
209202
"""
210-
# pylint: disable=unused-argument
211203
temp_template = common.get_test_id(cluster)
212204

213205
src_addr = payment_addrs[0]
@@ -272,7 +264,6 @@ def test_neg_query_protocol_state(
272264
273265
Expect failure.
274266
"""
275-
# pylint: disable=unused-argument
276267
common.get_test_id(cluster)
277268

278269
_setup_scenarios(cluster_obj=cluster, env_scenario=env_scenario, arg_scenario=arg_scenario)
@@ -303,7 +294,6 @@ def test_neg_query_stake_distribution(
303294
304295
Expect failure.
305296
"""
306-
# pylint: disable=unused-argument
307297
common.get_test_id(cluster)
308298

309299
_setup_scenarios(cluster_obj=cluster, env_scenario=env_scenario, arg_scenario=arg_scenario)
@@ -333,7 +323,6 @@ def test_neg_query_protocol_params(
333323
334324
Expect failure.
335325
"""
336-
# pylint: disable=unused-argument
337326
common.get_test_id(cluster)
338327

339328
_setup_scenarios(cluster_obj=cluster, env_scenario=env_scenario, arg_scenario=arg_scenario)
@@ -363,7 +352,6 @@ def test_neg_query_pool_state(
363352
364353
Expect failure.
365354
"""
366-
# pylint: disable=unused-argument
367355
common.get_test_id(cluster)
368356

369357
_setup_scenarios(cluster_obj=cluster, env_scenario=env_scenario, arg_scenario=arg_scenario)
@@ -393,7 +381,6 @@ def test_neg_query_stake_addr_info(
393381
394382
Expect failure.
395383
"""
396-
# pylint: disable=unused-argument
397384
common.get_test_id(cluster)
398385

399386
_setup_scenarios(cluster_obj=cluster, env_scenario=env_scenario, arg_scenario=arg_scenario)
@@ -427,7 +414,6 @@ def test_neg_build_transfer_funds(
427414
428415
Expect failure.
429416
"""
430-
# pylint: disable=unused-argument
431417
temp_template = common.get_test_id(cluster)
432418

433419
_setup_scenarios(cluster_obj=cluster, env_scenario=env_scenario, arg_scenario=arg_scenario)

0 commit comments

Comments
 (0)