LibCST icon indicating copy to clipboard operation
LibCST copied to clipboard

A concrete syntax tree parser and serializer library for Python that preserves many aspects of Python's abstract syntax tree

Results 195 LibCST issues
Sort by recently updated
recently updated
newest added

Matcher decorators are beatyfull, what think you about to support it for metadata providers? It can look so: ```py from typing import TypeVar from libcst import BaseMetadataProvider, matchers as m...

## Summary Currently, the way to print out the CST is using ``libcst.tool.dump``. There are many useful **inner** functions in ``libcst.tool`` which could be used by 3rd parties to provide...

CLA Signed

## Summary Creating a `RemoveUnusedImports` transformer according to the docs does not properly handle the `__all__` variable. ## Test Plan I added a test to `libcst/metadata/tests/test_scope_provider.py` that ensures the imports...

CLA Signed

pyright gets confused by your custom `__or__` methods on matcher classes, giving "Expected type expression but received `UnionType`". It does work with mypy, though I suspect that might simply be...

enhancement
machinery

## Summary This PR adds the ability for LibCST to parse the "=" operator inside of the square brackets as outlined in PEP-696 ## Major Changes Additional python tests were...

CLA Signed

https://peps.python.org/pep-0696/#grammar-changes will ship with Python 3.13, so I'd like to get this into LibCST by the time the release candidates for 3.13 are out. Assign to yourself or comment if...

enhancement
parsing

Bumps [black](https://github.com/psf/black) from 23.12.1 to 24.4.2. Release notes Sourced from black's releases. 24.4.2 This is a bugfix release to fix two regressions in the new f-string parser introduced in 24.4.1....

CLA Signed
dependencies
python

Bumps [memchr](https://github.com/BurntSushi/memchr) from 2.5.0 to 2.7.2. Commits 20ef11f 2.7.2 1e4b8a8 wasm32: require 'simd128' to be enabled at compile time e02697b ci: bump actions/checkout to v4 b12ad6d ci: reintroduce x86-64 test...

CLA Signed
dependencies
rust

Hi, everything seems to be a @dataclass except for MaybeSentinel. Would be nice to make this a dataclass too to allow to easy serialization and deserialization. Thank you.

enhancement
machinery

## Summary Before tackling issue #457, there are some bare Exceptions thrown from within the code. Here is the logic for changes in Exceptions: * use `ValueError` when issue caused...

CLA Signed