Skip to content

Commit

Permalink
[release] Bump LibCST to new release 0.3.4
Browse files Browse the repository at this point in the history
  • Loading branch information
jimmylai committed May 12, 2020
1 parent bfcc456 commit 3c5aa26
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 1 deletion.
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
# 0.3.5 - 2020-05-12

## Updated
- Expose more granular `Assignments` and `Accesses` for dotted imports in `ScopeProvider`. [#284](https://github.com/Instagram/LibCST/pull/284)
- `get_qualified_names_for` returns the most appropriate qualified name. [#290](https://github.com/Instagram/LibCST/pull/290)
- Surface `SyntaxError` raised by formatter in codemod run. [#288](https://github.com/Instagram/LibCST/pull/288) [#289](https://github.com/Instagram/LibCST/pull/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](https://github.com/Instagram/LibCST/pull/291)

## Fixed
- Close opened file handles on finishing codemod to avoid `Too many open files` on OSX. [#283](https://github.com/Instagram/LibCST/pull/283)

## Deprecated
- `ApplyTypeAnnotationsVisitor.add_stub_to_context` is renamed as `ApplyTypeAnnotationsVisitor.store_stub_in_context`.

# 0.3.4 - 2020-03-27

## Added
Expand Down
2 changes: 1 addition & 1 deletion libcst/_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
# LICENSE file in the root directory of this source tree.


LIBCST_VERSION: str = "0.3.4"
LIBCST_VERSION: str = "0.3.5"
11 changes: 11 additions & 0 deletions libcst/codemod/visitors/_apply_type_annotations.py
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,17 @@ def __init__(
# insert top-level annotations.
self.import_statements: List[cst.ImportFrom] = []

@staticmethod
def store_stub_in_context(
context: CodemodContext,
stub: cst.Module,
overwrite_existing_annotations: bool = False,
) -> None:
# deprecated, should be removed in 0.4 release.
ApplyTypeAnnotationsVisitor.store_stub_in_context(
context, stub, overwrite_existing_annotations
)

@staticmethod
def store_stub_in_context(
context: CodemodContext,
Expand Down

0 comments on commit 3c5aa26

Please sign in to comment.