diff --git a/autogpt/autogpt/app/cli.py b/autogpt/autogpt/app/cli.py index 65aa6f514ad8..71658dbf2562 100644 --- a/autogpt/autogpt/app/cli.py +++ b/autogpt/autogpt/app/cli.py @@ -113,7 +113,7 @@ def cli(ctx: click.Context): @click.option( "--component-config-file", help="Path to a json configuration file", - type=click.Path(exists=True, dir_okay=False, resolve_path=True), + type=click.Path(exists=True, dir_okay=False, resolve_path=True, path_type=Path), ) def run( continuous: bool, diff --git a/autogpt/scripts/git_log_to_release_notes.py b/autogpt/scripts/git_log_to_release_notes.py index 9d8afd6a498d..8ae2a9bc91a6 100755 --- a/autogpt/scripts/git_log_to_release_notes.py +++ b/autogpt/scripts/git_log_to_release_notes.py @@ -19,7 +19,7 @@ help="Path to the git repository", ) @coroutine -async def generate_release_notes(repo_path: Optional[Path] = None): +async def generate_release_notes(repo_path: Optional[str | Path] = None): logger = logging.getLogger(generate_release_notes.name) # pyright: ignore repo = Repo(repo_path, search_parent_directories=True) diff --git a/benchmark/agbenchmark/__main__.py b/benchmark/agbenchmark/__main__.py index c8f2a143012c..9463d4c81c24 100644 --- a/benchmark/agbenchmark/__main__.py +++ b/benchmark/agbenchmark/__main__.py @@ -97,7 +97,9 @@ def start(): help="Write log output to a file instead of the terminal.", ) # @click.argument( -# "agent_path", type=click.Path(exists=True, file_okay=False), required=False +# "agent_path", +# type=click.Path(exists=True, file_okay=False, path_type=Path), +# required=False, # ) def run( maintain: bool, diff --git a/benchmark/reports/format.py b/benchmark/reports/format.py index e4b6469db9bf..c8eb662b2769 100755 --- a/benchmark/reports/format.py +++ b/benchmark/reports/format.py @@ -1,13 +1,16 @@ #!/usr/bin/env python3 from pathlib import Path + import click from agbenchmark.reports.processing.report_types import Report @click.command() -@click.argument("report_json_file", type=click.Path(exists=True, dir_okay=False)) +@click.argument( + "report_json_file", type=click.Path(exists=True, dir_okay=False, path_type=Path) +) def print_markdown_report(report_json_file: Path): """ Generates a Markdown report from a given report.json file.