[release] Bump LibCST to new release 0.3.4

This commit is contained in:
Jimmy Lai 2020-05-12 09:40:47 -07:00 committed by jimmylai
parent bfcc456087
commit 3c5aa26839
3 changed files with 26 additions and 1 deletions

View file

@ -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

View file

@ -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"

View file

@ -249,6 +249,17 @@ class ApplyTypeAnnotationsVisitor(ContextAwareTransformer):
# 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,