From 997af1d08ee37784b7ce6b991985201d01d4d4ec Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 3 Dec 2024 16:43:14 +0800 Subject: [PATCH] chore(pre-commit): [pre-commit.ci] autoupdate (#176) Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Xuehai Pan --- .pre-commit-config.yaml | 2 +- optree/ops.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 93cb5312..5ea51cc3 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -30,7 +30,7 @@ repos: hooks: - id: clang-format - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.8.0 + rev: v0.8.1 hooks: - id: ruff args: [--fix, --exit-non-zero-on-fix] diff --git a/optree/ops.py b/optree/ops.py index 876b5240..41de486e 100644 --- a/optree/ops.py +++ b/optree/ops.py @@ -639,7 +639,7 @@ def tree_is_leaf( (default: :const:`''`, i.e., the global namespace) Returns: - A boolean indicating if all elements in the input iterable are leaves. + A boolean indicating if the given object is a leaf node. """ return _C.is_leaf(tree, is_leaf, none_is_leaf, namespace) # type: ignore[arg-type]