From 2e7acce1a60fdc95815d5a7e9723edf19d8bf315 Mon Sep 17 00:00:00 2001 From: Nick Sullivan Date: Tue, 8 Aug 2023 12:44:31 +0200 Subject: [PATCH] Use click.command() instead of click.command (fixes python 3.10 linux issue) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Resolves #74 Updated the syntax for click commands in `learn.py`, `review.py`, and `sidekick.py` to include parentheses. This change ensures consistency and clarity in the codebase. 🛠️📚 --- aicodebot/commands/learn.py | 2 +- aicodebot/commands/review.py | 2 +- aicodebot/commands/sidekick.py | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/aicodebot/commands/learn.py b/aicodebot/commands/learn.py index ac02804..4f6a622 100644 --- a/aicodebot/commands/learn.py +++ b/aicodebot/commands/learn.py @@ -14,7 +14,7 @@ DEFAULT_EXCLUDE = [".csv", ".enex", ".json", ".jsonl"] -@click.command +@click.command() @click.option("-v", "--verbose", count=True) @click.option("-r", "--repo-url", help="The URL of the repository to learn from") def learn(repo_url, verbose): diff --git a/aicodebot/commands/review.py b/aicodebot/commands/review.py index cfece09..def764b 100644 --- a/aicodebot/commands/review.py +++ b/aicodebot/commands/review.py @@ -7,7 +7,7 @@ import click, json, sys -@click.command +@click.command() @click.option("-c", "--commit", help="The commit hash to review (otherwise look at [un]staged changes).") @click.option("--output-format", default="text", type=click.Choice(["text", "json"], case_sensitive=False)) @click.option("-t", "--response-token-size", type=int, default=DEFAULT_RESPONSE_TOKENS * 2) diff --git a/aicodebot/commands/sidekick.py b/aicodebot/commands/sidekick.py index d14a9c2..69968bf 100644 --- a/aicodebot/commands/sidekick.py +++ b/aicodebot/commands/sidekick.py @@ -11,7 +11,7 @@ import click, sys -@click.command +@click.command() @click.option("-r", "--request", help="What to ask your sidekick to do") @click.option("-n", "--no-files", is_flag=True, help="Don't automatically load any files for context") @click.option("-m", "--max-file-tokens", type=int, default=10_000, help="Don't load files larger than this") @@ -142,7 +142,7 @@ def sidekick(request, no_files, max_file_tokens, files): # noqa: PLR0915 break -@click.command +@click.command() @click.option("-l", "--learned-repos", multiple=True, help="The name of the repo to use for learned information") def sidekick_agent(learned_repos): """