Skip to content

Commit

Permalink
Fixing mypy for Python 3.8 (run-llama#9031)
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesbraza authored Nov 20, 2023
1 parent e623a81 commit b5f8fae
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

- Fixed bug in formatting chat prompt templates when estimating chunk sizes (#9025)
- Sandboxed Pandas execution, remidiate CVE-2023-39662 (#8890)
- Restored `mypy` for Python 3.8 (#9031)

## [0.9.4] - 2023-11-19

Expand Down
4 changes: 2 additions & 2 deletions llama_index/indices/managed/vectara/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import json
import logging
import os
from typing import Any, Optional, Sequence, Type
from typing import Any, Dict, Optional, Sequence, Type

import requests

Expand Down Expand Up @@ -155,7 +155,7 @@ def _delete_doc(self, doc_id: str) -> bool:
return True

def _index_doc(self, doc: dict) -> str:
request: dict[str, Any] = {}
request: Dict[str, Any] = {}
request["customerId"] = self._vectara_customer_id
request["corpusId"] = self._vectara_corpus_id
request["document"] = doc
Expand Down
4 changes: 2 additions & 2 deletions llama_index/response/notebook_utils.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""Utils for jupyter notebook."""
import os
from io import BytesIO
from typing import Any, Dict, Tuple
from typing import Any, Dict, List, Tuple

import matplotlib.pyplot as plt
import requests
Expand All @@ -26,7 +26,7 @@ def display_image(img_str: str, size: Tuple[int, int] = DEFAULT_THUMBNAIL_SIZE)


def display_image_uris(
image_paths: list[str],
image_paths: List[str],
image_matrix: Tuple[int, int] = DEFAULT_IMAGE_MATRIX,
top_k: int = DEFAULT_SHOW_TOP_K,
) -> None:
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ disallow_untyped_defs = true
# Remove venv skip when integrated with pre-commit
exclude = ["build", "examples", "notebooks", "venv"]
ignore_missing_imports = true
python_version = "3.8"

[tool.poetry]
authors = ["Jerry Liu <[email protected]>"]
Expand Down

0 comments on commit b5f8fae

Please sign in to comment.