Skip to content

Commit

Permalink
include type checker
Browse files Browse the repository at this point in the history
  • Loading branch information
abi committed Jan 9, 2024
1 parent 1aeb8c4 commit 7073879
Show file tree
Hide file tree
Showing 5 changed files with 62 additions and 2 deletions.
4 changes: 4 additions & 0 deletions backend/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# Run the type checker

poetry run pyright

# Run tests

poetry run pytest
3 changes: 2 additions & 1 deletion backend/eval.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

from eval_config import EVALS_DIR
from eval_utils import image_to_data_url
from prompts.types import Stack

load_dotenv()

Expand All @@ -15,7 +16,7 @@
from utils import pprint_prompt


async def generate_code_core(image_url: str, stack: str) -> str:
async def generate_code_core(image_url: str, stack: Stack) -> str:
prompt_messages = assemble_prompt(image_url, stack)
openai_api_key = os.environ.get("OPENAI_API_KEY")
openai_base_url = None
Expand Down
53 changes: 52 additions & 1 deletion backend/poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions backend/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ httpx = "^0.25.1"

[tool.poetry.group.dev.dependencies]
pytest = "^7.4.3"
pyright = "^1.1.345"

[build-system]
requires = ["poetry-core"]
Expand Down
3 changes: 3 additions & 0 deletions backend/pyrightconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"exclude": ["image_generation.py"]
}

0 comments on commit 7073879

Please sign in to comment.