File tree 2 files changed +4
-3
lines changed
2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change 1
1
# type: ignore
2
2
import abc
3
3
import struct
4
- import time
4
+ from typing import Optional
5
5
6
6
import pytest_asyncio
7
7
@@ -30,7 +30,7 @@ class Meta:
30
30
class Member (BaseJsonModel , index = True ):
31
31
name : str
32
32
embeddings : list [list [float ]] = Field ([], vector_options = vector_field_options )
33
- embeddings_score : float | None = None
33
+ embeddings_score : Optional [ float ] = None
34
34
35
35
await Migrator ().run ()
36
36
Original file line number Diff line number Diff line change 1
1
import abc
2
2
import datetime
3
3
from collections import namedtuple
4
+ from typing import Optional
4
5
5
6
import pytest
6
7
import pytest_asyncio
@@ -55,7 +56,7 @@ def test_validator_sets_value_on_init():
55
56
value = "bar"
56
57
57
58
class ModelWithValidator (HashModel ):
58
- field : str | None = Field (default = None , index = True )
59
+ field : Optional [ str ] = Field (default = None , index = True )
59
60
60
61
@field_validator ("field" , mode = "after" )
61
62
def set_field (cls , v ):
You can’t perform that action at this time.
0 commit comments