Tree-sitter

Latest version: v0.23.2

Safety actively analyzes 682229 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 1 of 2

0.23.2

What's Changed
* Update documentation on `Query.captures()` by Bzero in https://github.com/tree-sitter/py-tree-sitter/pull/306
* build: bump tree_sitter/core from `46bdc14` to `f629fd4` by dependabot in https://github.com/tree-sitter/py-tree-sitter/pull/307
* fix(query): iterate over captures for the shortest size, not longest by amaanq in https://github.com/tree-sitter/py-tree-sitter/pull/309

New Contributors
* Bzero made their first contribution in https://github.com/tree-sitter/py-tree-sitter/pull/306

**Full Changelog**: https://github.com/tree-sitter/py-tree-sitter/compare/v0.23.1...v0.23.2

0.23.1

What's Changed
* build: bump tree_sitter/core from `12fb318` to `ee06325` by dependabot in https://github.com/tree-sitter/py-tree-sitter/pull/286
* ci: bump pypa/cibuildwheel from 2.20 to 2.21 in the actions group by dependabot in https://github.com/tree-sitter/py-tree-sitter/pull/291


**Full Changelog**: https://github.com/tree-sitter/py-tree-sitter/compare/v0.23.0...v0.23.1

0.23.0

Additions:

- `Node.child_containing_descendant(descendant)`
- `Tree.language` (getter)
- `Query.pattern_count` (getter)
- `Query.capture_count` (getter)
- `Query.match_limit` (getter)
- `Query.did_exceed_match_limit` (getter)
- `Query.set_match_limit(match_limit)`: returns `self`
- `Query.set_max_start_depth(max_start_depth)`: returns `self`
- `Query.set_byte_range(byte_range)`: returns `self`
- `Query.set_point_range(point_range)`: returns `self`
- `Query.disable_pattern(index)`: returns `self`
- `Query.disable_capture(capture)`: returns `self`
- `Query.pattern_settings(index)`
- `Query.pattern_assertions(index)`
- `Query.start_byte_for_pattern(index)`
- `Query.end_byte_for_pattern(index)`
- `Query.is_pattern_rooted(index)`
- `Query.is_pattern_non_local(index)`
- `Query.is_pattern_guaranteed_at_step(offset)`
- `QueryError` (exception class)
- `QueryPredicate` (typing protocol)

Removals:

- `Parser.set_language(language)`
- `Parser.set_included_ranges(ranges)`
- `Parser.set_timeout_micros(timeout)`
- `Node.sexp()`
- `Tree.text()`
- `TreeCursor.goto_first_child_for_point(row, column)`
- `LookaheadIterator.reset(language, state)`

Changes:

- `Language()` accepts a [capsule](https://docs.python.org/3.13/library/types.html#types.CapsuleType) as an argument.
- `Parser.parse(...)` no longer accepts a `keep_text` argument.
- `Query.captures(...)`
- Range arguments were removed (use `set_*` instead).
- Added an argument for custom query predicates.
- Return type was changed to `dict[str, list[Node]]`.
- `Query.matches(...)`
- Range arguments were removed (use `set_*` instead).
- Added an argument for custom query predicates.
- Return type was changed to `list[tuple[int, dict[str, list[Node]]]]`.
- `TreeCursor.goto_first_child_for_byte(byte)` returns `int | None`.
- `TreeCursor.goto_first_child_for_point(point)` returns `int | None`.

0.22.3

**Full Changelog**: https://github.com/tree-sitter/py-tree-sitter/compare/v0.22.2...v0.22.3

0.22.2

**Full Changelog**: https://github.com/tree-sitter/py-tree-sitter/compare/v0.22.1...v0.22.2

0.22.1

**Full Changelog**: https://github.com/tree-sitter/py-tree-sitter/compare/v0.22.0...v0.22.1

Page 1 of 2

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.