mirror of
https://github.com/Aider-AI/aider.git
synced 2025-06-01 02:05:00 +00:00
style: format code with black
This commit is contained in:
parent
eaaf05d964
commit
ef45fe1015
1 changed files with 7 additions and 7 deletions
|
@ -45,7 +45,7 @@ def fname_to_url(filepath):
|
|||
md = ".md"
|
||||
|
||||
# Convert backslashes to forward slashes for consistency
|
||||
filepath = filepath.replace('\\', '/')
|
||||
filepath = filepath.replace("\\", "/")
|
||||
|
||||
# Convert to Path object for easier manipulation
|
||||
path = Path(filepath)
|
||||
|
@ -67,7 +67,7 @@ def fname_to_url(filepath):
|
|||
return ""
|
||||
|
||||
# Join the remaining parts
|
||||
url_path = '/'.join(relevant_parts)
|
||||
url_path = "/".join(relevant_parts)
|
||||
|
||||
# Handle index.md and other .md files
|
||||
if url_path.lower().endswith(index.lower()):
|
||||
|
@ -76,7 +76,7 @@ def fname_to_url(filepath):
|
|||
url_path = url_path[: -len(md)] + ".html"
|
||||
|
||||
# Ensure the URL starts and ends with '/'
|
||||
url_path = url_path.strip('/')
|
||||
url_path = url_path.strip("/")
|
||||
|
||||
return f"https://aider.chat/{url_path}"
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue