style: auto-format 12 files with ruff format (CI formatting check)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
yusyus
2026-02-22 22:32:31 +03:00
parent efc722eeed
commit ef14fd4b5d
12 changed files with 124 additions and 63 deletions

View File

@@ -97,6 +97,7 @@ class LlmsTxtParser:
# causes httpx to raise "Invalid IPv6 URL" when the URL is fetched.
if "[" in url or "]" in url:
from urllib.parse import urlparse, urlunparse
parsed = urlparse(url)
# Only encode brackets in the path/query/fragment, not in the host
encoded_path = parsed.path.replace("[", "%5B").replace("]", "%5D")