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 20, 2024
1 parent cb46063 commit edf0320
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 @@ -3,7 +3,7 @@
import re
import warnings
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 @@ -107,7 +107,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 edf0320

Please sign in to comment.