Project

General

Profile

Bug #1227 » 0031-Remove-deprecated-pathlib.PurePath.is_reserved-usage.patch

main, S3_3 - Marko Lindqvist, 04/05/2025 11:07 AM

View differences:

common/generate_packets.py
"""Parse the given path and check basic validity."""
path = Path(s)
if path.is_reserved() or not path.name:
if not path.name:
raise ValueError(f"not a valid file path: {s!r}")
if path.exists() and not path.is_file():
raise ValueError(f"not a file: {s!r}")
gen_headers/generate_enums.py
"""Parse the given path and check basic validity."""
path = Path(s)
if path.is_reserved() or not path.name:
if not path.name:
raise ValueError(f"not a valid file path: {s!r}")
if path.exists() and not path.is_file():
raise ValueError(f"not a file: {s!r}")
(3-3/4)