Update Optional[x] -> x | None and Union[x, y] to x | y (#26633)

Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
This commit is contained in:
Harry Mellor
2025-10-12 09:51:31 -07:00
committed by GitHub
parent 9bb38130cb
commit 8fcaaf6a16
944 changed files with 9490 additions and 10121 deletions
+4 -4
View File
@@ -23,7 +23,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.
from functools import cached_property
from typing import Union
import PIL
import torch
@@ -104,9 +103,10 @@ class OvisProcessor(ProcessorMixin):
def __call__(
self,
images: ImageInput = None,
text: Union[
TextInput, PreTokenizedInput, list[TextInput], list[PreTokenizedInput]
] = None,
text: TextInput
| PreTokenizedInput
| list[TextInput]
| list[PreTokenizedInput] = None,
**kwargs: Unpack[OvisProcessorKwargs],
) -> BatchFeature:
"""