chore: tighten upkeep boundaries and static checks
This commit is contained in:
@@ -16,7 +16,11 @@ def _path_matches(pm: PathMatch, request_path: str) -> bool:
|
||||
if not pm.value.endswith("/"):
|
||||
return request_path.startswith(pm.value + "/")
|
||||
return request_path.startswith(pm.value)
|
||||
return pm.type == "regex" and pm.compiled is not None and pm.compiled.search(request_path) is not None
|
||||
return (
|
||||
pm.type == "regex"
|
||||
and pm.compiled is not None
|
||||
and pm.compiled.search(request_path) is not None
|
||||
)
|
||||
|
||||
|
||||
def _entry_matches(
|
||||
|
||||
@@ -347,5 +347,3 @@ def load_config(text: str) -> "Config":
|
||||
except YamlSubsetError as e:
|
||||
raise ValueError(f"routes payload: invalid YAML: {e}") from e
|
||||
return parse_config(payload)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user