mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-29 00:35:00 +00:00
chore: remove redundant code
1. The module already imports `requests`, so by the time this check is called, the module is already loaded. 2. Even if the code path were taken, it would fail anyway, because the `aider[oauth]` extra was hallucinated and does not exist. 3. Downstream distributions usually have managed Python environments, where pip cannot be used at all. That means distros must patch out every such pip invocation (example: [1]; full disclosure: I maintain this but other distros will eventually bump into the same issues). Restricting at-runtime pip usage to the minimum necessary is friendlier to distro maintainers. [1]: https://aur.archlinux.org/cgit/aur.git/tree/archlinux-use-system.patch?h=aider-chat&id=7f8156946857215104bce151454ad0101ade4a48
This commit is contained in:
parent
f1695f8b15
commit
7ae0fa3775
1 changed files with 0 additions and 5 deletions
|
@ -13,7 +13,6 @@ import requests
|
|||
|
||||
from aider import urls
|
||||
from aider.io import InputOutput
|
||||
from aider.utils import check_pip_install_extra
|
||||
|
||||
|
||||
def check_openrouter_tier(api_key):
|
||||
|
@ -215,10 +214,6 @@ def exchange_code_for_key(code, code_verifier, io):
|
|||
def start_openrouter_oauth_flow(io, analytics):
|
||||
"""Initiates the OpenRouter OAuth PKCE flow using a local server."""
|
||||
|
||||
# Check for requests library
|
||||
if not check_pip_install_extra(io, "requests", "OpenRouter OAuth", "aider[oauth]"):
|
||||
return None
|
||||
|
||||
port = find_available_port()
|
||||
if not port:
|
||||
io.tool_error("Could not find an available port between 8484 and 8584.")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue