Skip to content

Commit f147fad

Browse files
committed
Python 3.9 compatibility changes; pre-commit updates
1 parent 42f0d19 commit f147fad

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

python-sdk/.pre-commit-config.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
repos:
22
- repo: https://github.com/charliermarsh/ruff-pre-commit
3-
rev: v0.11.8
3+
rev: v0.12.9
44
hooks:
55
- id: ruff
66
args: [
@@ -10,12 +10,12 @@ repos:
1010
- id: ruff-format
1111
files: ^python-sdk/
1212
- repo: https://github.com/pre-commit/mirrors-mypy
13-
rev: v1.15.0
13+
rev: v1.17.1
1414
hooks:
1515
- id: mypy
1616
files: ^python-sdk/
1717
args: [
18-
--python-version=3.12,
18+
--python-version=3.9,
1919
--disallow-untyped-calls,
2020
--disallow-untyped-defs,
2121
--disallow-incomplete-defs,

python-sdk/ag_ui/encoder/encoder.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
This module contains the EventEncoder class
33
"""
44

5+
from typing import Union
6+
57
from ag_ui.core.events import BaseEvent
68

79
AGUI_MEDIA_TYPE = "application/vnd.ag-ui.event+proto"
@@ -12,7 +14,7 @@ class EventEncoder:
1214
Encodes Agent User Interaction events.
1315
"""
1416

15-
def __init__(self, accept: str | None = None):
17+
def __init__(self, accept: Union[str, None] = None):
1618
pass
1719

1820
def get_content_type(self) -> str:

0 commit comments

Comments
 (0)