ruff
f8519be3 - Update LibCST-based fixes for Python 3.15 (#28616)

Commit
8 days ago
Update LibCST-based fixes for Python 3.15 (#28616) Summary -- This PR bumps our libcst version to 1.9 and incorporates the new support for Python 3.15 into fixes that involved imports and unpacking in comprehensions. The unpacking fixes affect three C4 rules and are in the first (non-empty) commit, while the lazy import fixes are a bit more widespread and are in the second commit. I admittedly wasn't that familiar with our usage of libcst before this, but it looks like we have kind of a weird mix between using libcst and additional manual string manipulation. My changes preserve that with a couple of `format!("lazy {fix}")` calls. libcst also itself makes this change a bit awkward by using separate node types for lazy and non-lazy imports, so I ended up returning the parts of the imports instead of `Import` types directly in a couple of cases. Test Plan -- Updated existing snapshots for the C4 rules and new mdtests for the import helpers
Author
Parents
Loading