Skip to content

Commit 23a71cf

Browse files
authored
Merge pull request #12 from grafana/allow-python-3.11
2 parents 4322641 + ee98d3e commit 23a71cf

File tree

4 files changed

+105
-8
lines changed

4 files changed

+105
-8
lines changed

.github/workflows/python.yml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,13 @@ on:
77
pull_request:
88

99
jobs:
10-
uv-example:
11-
name: python
10+
test:
11+
name: python-${{ matrix.python-version }}
1212
runs-on: ubuntu-latest
13+
strategy:
14+
matrix:
15+
python-version: ['3.10', '3.11', '3.12']
16+
fail-fast: false
1317

1418
steps:
1519
- uses: actions/checkout@v4
@@ -28,10 +32,10 @@ jobs:
2832
# Install a specific version of uv.
2933
version: "0.5.13"
3034

31-
- name: "Set up Python"
35+
- name: "Set up Python ${{ matrix.python-version }}"
3236
uses: actions/setup-python@v5
3337
with:
34-
python-version-file: "pyproject.toml"
38+
python-version: ${{ matrix.python-version }}
3539

3640
- name: Install the project
3741
run: uv sync --all-extras --all-groups

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ authors = [
77
{ name = "Ben Sully", email = "[email protected]" }
88
]
99
license = { file = "LICENSE" }
10-
requires-python = ">=3.12"
10+
requires-python = ">=3.10"
1111
dependencies = [
1212
"httpx>=0.28.1",
1313
"mcp[cli]==1.2.0",

src/mcp_grafana/grafana_types.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44

55
import textwrap
66
from datetime import datetime
7-
from typing import Annotated, Any, Literal
7+
from typing import Annotated, Any, Generic, Literal, TypeVar
8+
89

910
import pydantic
1011
from pydantic import UUID4, ConfigDict, Field, PlainSerializer, TypeAdapter
@@ -345,7 +346,10 @@ class CreateSiftInvestigationArguments(BaseModel):
345346
# )
346347

347348

348-
class ResponseWrapper[T](BaseModel):
349+
T = TypeVar("T")
350+
351+
352+
class ResponseWrapper(BaseModel, Generic[T]):
349353
status: str
350354
data: T
351355

0 commit comments

Comments
 (0)