refactor: CLI value checks in their own module, uptime parser in parsers.py (#17)
driver / standard (pull_request) Successful in 16s
driver / lint (pull_request) Successful in 13s
driver / types (pull_request) Successful in 52s
driver / test (3.12) (pull_request) Successful in 55s
driver / test (3.13) (pull_request) Successful in 45s
driver / lowest (pull_request) Successful in 25s
driver / build (pull_request) Successful in 26s
driver / security (pull_request) Successful in 58s
CI / driver (pull_request) Successful in 2m22s
driver / publish (pull_request) Skipped

The checks against line breaks and double quotes made the driver module
27 lines longer than the quality ratchet allows (2014, recorded 1987) and
set_interface 53 lines long (limit 50).

The checks move to cli_values.py (check_cli_values); the uptime parser,
a pure parser without the driver, moves to parsers.py as
parse_uptime_seconds and reads its four units in one loop; set_vlan and
set_interface say in one docstring line what they refuse. Behaviour is
unchanged; the uptime test gains a string without days and an empty one.
The baseline is lowered to what is measured now (1971).
This commit is contained in:
Christian Manivong committed 2026-11-13 08:59:30 +01:00
1 parent ea001751cb
commit a689c50ee1
5 files changed
+62 -56

No files matched your search

+1 -1
View File
@@ -27,7 +27,7 @@
"napalm_tplink_jetstream.tplink_jetstream"
],
"python_file_lines": {
"napalm_tplink_jetstream/tplink_jetstream.py": 1987
"napalm_tplink_jetstream/tplink_jetstream.py": 1971
},
"untyped_public": []
}