diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index d29ae63..00fdc28 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -16,7 +16,7 @@ repos: - id: fmt - id: cargo-check - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.14.10 + rev: v0.15.0 hooks: - id: ruff args: [--fix, --select, I] # I = isort (import sorting) diff --git a/Cargo.lock b/Cargo.lock index 2164708..a1ceb70 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -121,7 +121,7 @@ checksum = "b1dd07eb858a2067e2f3c7155d54e929265c264e6f37efe3ee7a8d1b5a1dd0ba" [[package]] name = "toons" -version = "0.5.0" +version = "0.5.1" dependencies = [ "pyo3", ] diff --git a/Cargo.toml b/Cargo.toml index b83ced1..f69b766 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "toons" -version = "0.5.0" +version = "0.5.1" edition = "2024" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/pyproject.toml b/pyproject.toml index 43475ec..c67988e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -23,6 +23,7 @@ Source = "https://github.com/alesanfra/toons" [tool.maturin] features = ["pyo3/extension-module", "pyo3/abi3-py37"] +include = ["toons.pyi"] [tool.ruff] line-length = 79 diff --git a/toons.pyi b/toons.pyi new file mode 100644 index 0000000..c7a7960 --- /dev/null +++ b/toons.pyi @@ -0,0 +1,33 @@ +from typing import IO, Any, Optional + +def load( + fp: IO[str], + *, + strict: bool = True, + expand_paths: Optional[str] = None, + indent: Optional[int] = None, +) -> Any: ... +def loads( + s: str, + *, + strict: bool = True, + expand_paths: Optional[str] = None, + indent: Optional[int] = None, +) -> Any: ... +def dump( + obj: Any, + fp: IO[str], + *, + indent: int = 2, + delimiter: str = ",", + key_folding: Optional[str] = None, + flatten_depth: Optional[int] = None, +) -> None: ... +def dumps( + obj: Any, + *, + indent: int = 2, + delimiter: str = ",", + key_folding: Optional[str] = None, + flatten_depth: Optional[int] = None, +) -> str: ...