refactor(ping): the ping output parser lives with the other CLI parsers (#28)
driver / standard (pull_request) Successful in 16s
driver / lint (pull_request) Successful in 16s
driver / test (3.13) (pull_request) Successful in 46s
driver / types (pull_request) Successful in 57s
driver / test (3.12) (pull_request) Successful in 57s
driver / lowest (pull_request) Successful in 24s
driver / build (pull_request) Successful in 27s
driver / security (pull_request) Successful in 1m0s
CI / driver (pull_request) Successful in 2m13s
driver / publish (pull_request) Skipped

The checks against line breaks and double quotes made procurve.py 20
lines longer than the quality ratchet allows (1365, recorded 1345). The
module-level ping parser moves to parsers.py, which holds every other
pure CLI parser, as parse_ping_output; its two result dicts become one
helper, so it is no longer over 50 lines. Behaviour is unchanged; tests
for an unreachable target and an unknown answer are added. The baseline
is lowered to what is measured now (procurve.py 1300, the ping entry
gone).
This commit is contained in:
Christian Manivong committed 2026-11-13 08:57:42 +01:00
1 parent e06811de50
commit 23e799ee8d
4 files changed
+63 -72

No files matched your search

+2 -3
View File
@@ -18,8 +18,7 @@
"napalm_procurve/parsers.py::parse_ip_interfaces": 58,
"napalm_procurve/parsers.py::parse_lldp_neighbors_detail": 59,
"napalm_procurve/parsers.py::parse_system_info": 80,
"napalm_procurve/parsers.py::parse_vlans_from_running_config": 79,
"napalm_procurve/procurve.py::_parse_ping_output": 58
"napalm_procurve/parsers.py::parse_vlans_from_running_config": 79
},
"mypy_relaxed": [
"napalm_procurve.api_client",
@@ -27,7 +26,7 @@
"napalm_procurve.procurve"
],
"python_file_lines": {
"napalm_procurve/procurve.py": 1345
"napalm_procurve/procurve.py": 1300
},
"untyped_public": []
}