Skip to content

Commit 8b246a0

Browse files
authored
Merge pull request #40 from jkawamoto/literal
2 parents 7e5be5f + 820f9c4 commit 8b246a0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/mcp_bear/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
from functools import partial
1919
from http import HTTPStatus
2020
from pathlib import Path
21-
from typing import cast, AsyncIterator, Final, Any, Mapping
21+
from typing import cast, AsyncIterator, Final, Any, Mapping, Literal
2222
from urllib.parse import urlencode, quote
2323

2424
import requests
@@ -253,7 +253,7 @@ async def add_file(
253253
description="if specified add the file to the corresponding header inside the note", default=None
254254
),
255255
filename: str = Field(description="file name with extension"),
256-
mode: str | None = Field(description="adding mode (prepend, append)", default=None),
256+
mode: Literal["prepend", "append"] | None = Field(description="adding mode", default=None),
257257
) -> None:
258258
"""Append or prepend a file to a note identified by its title or id."""
259259
if file.startswith("http://") or file.startswith("https://"):

0 commit comments

Comments
 (0)