mirror of
https://github.com/okhsunrog/vpnhide.git
synced 2026-04-28 06:31:27 +00:00
chore(codegen): drop dead c == "" branch in test-name validation
`c` iterates one character at a time over the test name string; a single character is never the empty string, so the disjunct was always False. The remaining `0x20 <= ord(c) < 0x7F` already correctly rejects non-ASCII names, so behaviour is unchanged.
This commit is contained in:
parent
87a2041b88
commit
a0bec24576
1 changed files with 1 additions and 1 deletions
|
|
@ -134,7 +134,7 @@ def parse_test(entry: dict[str, Any]) -> TestVector:
|
|||
if "name" not in entry or "is_vpn" not in entry:
|
||||
raise SystemExit(f"[[test]] entry needs name and is_vpn: {entry!r}")
|
||||
name = str(entry["name"])
|
||||
if not all(c == "" or 0x20 <= ord(c) < 0x7F for c in name):
|
||||
if not all(0x20 <= ord(c) < 0x7F for c in name):
|
||||
raise SystemExit(f"non-ASCII test name {name!r}; the matcher itself is ASCII-only")
|
||||
return TestVector(name=name, is_vpn=bool(entry["is_vpn"]))
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue