Add pyupgrade pre-commit hook + modernize python code (#2611)

This commit is contained in:
Asher Foa
2025-06-10 14:52:38 -04:00
committed by GitHub
parent 272985f1bb
commit effd0c4911
18 changed files with 47 additions and 45 deletions

View File

@@ -4,7 +4,6 @@ from __future__ import annotations
import json
import os
from typing import Optional
import typer
from dotenv import load_dotenv
@@ -21,7 +20,7 @@ tasks_app = typer.Typer(help="Manage Skyvern tasks and operations.")
@tasks_app.callback()
def tasks_callback(
ctx: typer.Context,
api_key: Optional[str] = typer.Option(
api_key: str | None = typer.Option(
None,
"--api-key",
help="Skyvern API key",
@@ -32,7 +31,7 @@ def tasks_callback(
ctx.obj = {"api_key": api_key}
def _get_client(api_key: Optional[str] = None) -> Skyvern:
def _get_client(api_key: str | None = None) -> Skyvern:
"""Instantiate a Skyvern SDK client using environment variables."""
load_dotenv()
load_dotenv(".env")