Skip to content

Commit

Permalink
fix typing to support python versions < 3.9
Browse files Browse the repository at this point in the history
  • Loading branch information
leloykun committed May 4, 2024
1 parent d9d7dbe commit 1a2e5a0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions outlines/fsm/json_schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import json
import re
from copy import deepcopy
from typing import Callable, Optional
from typing import Callable, List, Optional

from jsonschema.protocols import Validator
from pydantic import create_model
Expand Down Expand Up @@ -106,7 +106,7 @@ def _is_null_type(instance: dict):
return False


def _has_null_type(instance_list: list[dict]):
def _has_null_type(instance_list: List[dict]):
for instance in instance_list:
if _is_null_type(instance):
return True
Expand Down

0 comments on commit 1a2e5a0

Please sign in to comment.