Skip to content

Commit 4a4eff4

Browse files
committed
chore(deps): update pyrefly to 0.22.0
Upgrade pyrefly from version 0.21.0 to 0.22.0 in both pyproject.toml and poetry.lock. Update code comments and type ignore directives to match new pyrefly linting and type checking requirements.
1 parent f335787 commit 4a4eff4

File tree

7 files changed

+21
-19
lines changed

7 files changed

+21
-19
lines changed

cardano_node_tests/tests/test_dbsync.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,7 @@ def test_blocks(self, cluster: clusterlib.ClusterLib): # noqa: C901
134134
rec = None
135135
prev_rec = None
136136
errors: list[str] = []
137+
# pyrefly: ignore # bad-assignment
137138
for rec in dbsync_queries.query_blocks(epoch_from=epoch_from):
138139
if not prev_rec:
139140
prev_rec = rec
@@ -211,7 +212,6 @@ def test_blocks(self, cluster: clusterlib.ClusterLib): # noqa: C901
211212
f"Expected: {prev_rec.id} vs Returned: {rec.previous_id}"
212213
)
213214

214-
# pyrefly: ignore # unknown
215215
prev_rec = rec
216216

217217
if errors:

cardano_node_tests/utils/clusterlib_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1094,7 +1094,7 @@ def wait_for_epoch_interval(
10941094
to_sleep = start_abs - s_from_epoch_start
10951095
if to_sleep > 0:
10961096
# `to_sleep` is float, wait for at least 1 second
1097-
time.sleep(max(1, to_sleep))
1097+
time.sleep(max(1.0, to_sleep))
10981098

10991099
# We can finish if slot number of last minted block doesn't need
11001100
# to match the time interval

cardano_node_tests/utils/dbsync_check_tx.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ def _get_scripts_hashes(
4848
for r in records:
4949
if not r.script_file:
5050
continue
51+
# pyrefly: ignore # bad-argument-type
5152
shash = cluster_obj.g_transaction.get_policyid(script_file=r.script_file)
5253
shash_rec = hashes_db.get(shash)
5354
if shash_rec is None:
@@ -137,7 +138,9 @@ def _compare_redeemers(
137138
)
138139

139140
for tx_rec in tx_recs:
141+
# pyrefly: ignore # missing-attribute
140142
tx_unit_steps = tx_rec.execution_units[0] if tx_rec.execution_units else None
143+
# pyrefly: ignore # missing-attribute
141144
tx_unit_mem = tx_rec.execution_units[1] if tx_rec.execution_units else None
142145

143146
missing_tx_unit_steps = not (tx_unit_steps and tx_unit_mem)

cardano_node_tests/utils/framework_log.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ def framework_logger() -> logging.Logger:
2020
"""
2121

2222
class UTCFormatter(logging.Formatter):
23-
converter = time.gmtime
23+
converter = time.gmtime # type: ignore[assignment]
2424

2525
formatter = UTCFormatter("%(asctime)s %(levelname)s %(message)s")
2626
handler = logging.FileHandler(get_framework_log_path())

cardano_node_tests/utils/requirements.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -125,11 +125,11 @@ def merge_reqs(*reqs: dict[str, dict]) -> dict:
125125
for req_id, req_data in greqs.items():
126126
merged_rec = merged_group.get(req_id) or {}
127127
merged_status_key = merged_rec.get("status") or "uncovered"
128-
# pyrefly: ignore # bad-specialization, not-a-type
128+
129129
merged_status_val = Statuses[merged_status_key].value
130-
# pyrefly: ignore # bad-specialization
130+
131131
req_status_val = Statuses[req_data["status"]].value
132-
# pyrefly: ignore # missing-attribute
132+
133133
if not merged_rec or req_status_val < merged_status_val:
134134
merged_group[req_id] = req_data
135135
merged[gname] = merged_group
@@ -162,7 +162,6 @@ def get_mapped_req(mapping: pl.Path, executed_req: dict) -> dict: # noqa: C901
162162
dependencies_failures = []
163163

164164
for p_req in dependencies:
165-
# pyrefly: ignore # no-matching-overload, bad-argument-type
166165
p_status = executed_group.get(p_req, {}).get("status")
167166

168167
if not url:

poetry.lock

Lines changed: 11 additions & 11 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ types-PyYAML = "^6.0.12.20250516"
5353
types-requests = "^2.32.4.20250611"
5454
mypy = "^1.16.1"
5555
ipython = "^9.3.0"
56-
pyrefly = "^0.21.0"
56+
pyrefly = "^0.22.0"
5757

5858
[tool.poetry.group.docs]
5959
optional = true

0 commit comments

Comments
 (0)