Skip to content

Releases: Instagram/LibCST

LibCST 0.3.12 Release - 2020-10-01

01 Oct 15:23
10d6451
Compare
Choose a tag to compare

Fixed

  • fix RemoveImportsVisitor crash when ImportAlias is inserted without comma #397
  • Provide STORE for {Class,Function}Def.name in ExpressionContextProvider #394

LibCST 0.3.5 Release - 2020-09-28

28 Sep 16:40
efe0fdb
Compare
Choose a tag to compare

Added

  • Implement TypeOf matcher #384

Updated

  • Update return type of ParentNodeProvider to be CSTNode #377
  • Add source code links to each class/function #378

Fixed

  • Removing an import alias with a trailing standalone comment should preserve the comment #392

LibCST 0.3.10 Release - 2020-09-17

17 Aug 18:29
6f9a12c
Compare
Choose a tag to compare

Added

  • Handle string annotations in ScopeProvider #373
  • Add is_annotation subtype for Access inreferences. #372

Updated

  • Call pyre query with noninteractive logging #371
  • Replace matchers with explicit visitation in gatherers #366
  • Include missing test data in install #365

Fixed

  • Spaces around walrus operator are not required #368
  • SaveMachedNode now matches with trailing empty wildcards #356
  • Correctly extract wildcard matchers #355

LibCST 0.3.9 Release - 2020-09-07

07 Aug 18:52
867f85e
Compare
Choose a tag to compare

Added

  • Support string type annotations in RemoveUnusedImports #353
  • Add scope to ImportAlias #350
  • Add scope to ClassDef #349

Fixed

  • Fixed all pyre related errors #360
  • Fixed enclosing attribute for attributes in call arguments #362

LibCST 0.3.8 Release - 2020-07-22

23 Jul 01:19
857fcc7
Compare
Choose a tag to compare

0.3.8 - 2020-07-22

Added

  • Handle type subscripts when applying annotations. #335
  • Added FullRepoManager cache property #330
  • Added optional args for tox commands #327

Updated

  • Only remove trailing comma if the last alias is removed #334

Fixed

  • Fixed inserting imports after module docstring #343
  • Fixed ParenthesizedWhitespace before params in FuncDef #342
  • Fixed validation for ImportAlias and Try statements #340
  • Fixed NotEqual position issue #325
  • Fixed minor typo in scope_provider.py #324

LibCST 0.3.7 Release - 2020-06-25

25 Jun 15:55
4a928b0
Compare
Choose a tag to compare

Added

  • Added RenameCommand to rename all instances of a local or imported object to a specified new name. #308

Updated

  • Upgraded Codecov dev dependency to 2.1.4. #311
  • Enabled Pyre strict mode by default. #313

Fixed

  • Fixed ImportError under Python 3.9. #306
  • Fixed stdout being plugged into successfully codemod-ed files. #309
  • Fixed QualifiedName retrieval for names with repeated substrings. #312
  • Fixed default values of keyword-only and positional-only arguments in ApplyTypeAnnotationsVisitor. #314
  • Fixed ExpressionContextProvider by giving subscript values a LOADcontext. #319

LibCST 0.3.6 Release - 2020-05-29

29 May 15:56
666247a
Compare
Choose a tag to compare

Added

  • Added ConvertNamedTupleToDataclassCommand to convert NamedTuple class declarations to Python 3.7 dataclasses using the @dataclass(frozen=True) decorator. #299

Fixed

  • Fixed typo in file name libcst/codemod/commands/convert_percent_format_to_fstring.py. #301
  • Fixed StopIteration exception during scope analysis matching on import names. #302

LibCST 0.3.5 Release - 2020-05-13

13 May 15:35
Compare
Choose a tag to compare

Updated

  • Expose more granular Assignments and Accesses for dotted imports in ScopeProvider. #284
  • get_qualified_names_for returns the most appropriate qualified name. #290
  • Surface SyntaxError raised by formatter in codemod run. #288 #289
  • Rename ApplyTypeAnnotationsVisitor.add_stub_to_context as ApplyTypeAnnotationsVisitor.store_stub_in_context and add overwrite_existing_annotations to allow overwrite existing type annotations. #289

Fixed

  • Close opened file handles on finishing codemod to avoid Too many open files on OSX. #283

Deprecated

  • ApplyTypeAnnotationsVisitor.add_stub_to_context is renamed as ApplyTypeAnnotationsVisitor.store_stub_in_context.

LibCST 0.3.4 Release - 2020-03-27

27 Mar 18:29
Compare
Choose a tag to compare

Added

  • Supported CST parsing for Python 3.0, 3.1 and 3.3. #261
  • Added RemoveUnusedImportsCommand for removing unused import codemod. #266
  • Added ApplyTypeAnnotationsVisitor.add_stub_to_context for apply type annotations from stub modules. #265

Updated

  • Improved exception message of get_metadata when MetadataWrapper is not used. #257
  • New steps for Pyre type check in README.rst which analyzes installed Python sources for better type checking. #262

Fixed

  • Parsed except(Exception): correctly while there is no space after except syntax. #256
  • Fixed RemoveImportsVisitor to not remove imports when references still exist. #264
  • Fixed missing type annotations. #271
  • AddImportsVisitor generates deterministic order for added imports. #274

LibCST 0.3.3 Release - 2020-03-05

12 Mar 15:36
Compare
Choose a tag to compare

Added

  • ByteSpanPositionProvider provides start offset and length of CSTNode as metadata.
  • get_docstring helper provides docstring from Module, ClassDef and FunctionDef node types.

Updated

  • Optimized ScopeProvider performance to run faster and use less memory:
    • remove unnecessary Assignment of keyword Arg.
    • don't provide scope object for formatting information nodes.
    • batch set union updates in infer_accesses step.

Fixed

  • Fixed _assignments mutation when calling read-only Scope.get_qualified_names_for and __contains__.