Commit graph

538 commits

Author SHA1 Message Date
Jimmy Lai
1979ef619d add empty line to docstring. 2020-03-03 15:39:41 +00:00
Jimmy Lai
2711022843 [ScopeProvider][optimization] don't visit formatting information nodes 2020-03-03 15:27:53 +00:00
Jimmy Lai
24878a1b89 [ScopeProvider][optimization] use batch set union in infer_accesses 2020-03-03 14:09:33 +00:00
Jimmy Lai
08a89f15a6 [ScopeProvider][optimization] don't visit formatting information nodes 2020-03-03 11:32:46 +00:00
Jimmy Lai
922cc7251c add TOTO to not provide scope metadata for formatting nodes 2020-03-02 05:05:38 +00:00
Jimmy Lai
8136f10e2e Optimize Scope Analysis memory usage by removing unnecessary Assignment creation 2020-03-02 05:05:38 +00:00
Zsolt Dollenstein
bd31d3feac add docs and expose provider in libcst.metadata 2020-02-28 09:28:11 -08:00
Zsolt Dollenstein
caf74ac1a6 Add ByteSpanPositionProvider 2020-02-28 09:28:11 -08:00
Jimmy Lai
7a2c69c3b8 apply formatting autofix 2020-02-25 11:01:35 -08:00
Jimmy Lai
5603e7d954 Merge branch 'jimmylai-libcst_0_3' 2020-02-25 10:26:29 -08:00
jimmylai
4dcf2f9ef1
Merge branch 'master' into libcst_0_3 2020-02-25 10:25:23 -08:00
Jimmy Lai
91463ea7ec fix typo 2020-02-25 10:18:38 -08:00
Jimmy Lai
2ed89af002 add copyright header 2020-02-25 10:18:38 -08:00
Jimmy Lai
472e13dd26 Bump LibCST to new release 0.3.2. 2020-02-25 10:17:54 -08:00
jimmylai
9f70189029 Add pypi monthly download badge to README 2020-02-25 10:17:20 -08:00
Jimmy Lai
992340a971 fix typo 2020-02-25 10:11:42 -08:00
Jimmy Lai
4944293506 add copyright header 2020-02-25 10:11:42 -08:00
Jennifer Taylor
0ff9a6c5b7 Add a visitor which can remove unused imports using scope analysis. 2020-02-18 16:02:10 -08:00
Jennifer Taylor
8479513e8f Add a visitor that can gather exports specified in the __all__ module identifier. 2020-02-18 16:02:10 -08:00
Jennifer Taylor
7c2c0cbdcf Support format specifiers in f-string conversion, getting rid of the last TODO! 2020-02-18 15:56:05 -08:00
Jennifer Taylor
d61610f733 Add flags to allow semi-dangerous behavior in f-string conversion codemod. 2020-02-18 15:56:05 -08:00
Jimmy Lai
abd37df6b6 [doc] add get_full_name_for_node_or_raise 2020-02-12 12:03:57 -08:00
Jennifer Taylor
6f3f541812 Use helpers in various codemod transforms. 2020-02-11 10:25:27 -08:00
Jennifer Taylor
f2b738deda Add ability to specify an alias when adding a needed import from command-line. 2020-02-11 10:25:27 -08:00
Jennifer Taylor
4d8e074421 Add several helpers for import nodes. 2020-02-11 10:25:27 -08:00
Jennifer Taylor
c21ae59a6b Add support for current package to codemod context. 2020-02-07 11:52:16 -08:00
Jennifer Taylor
f6a1c77b2a Add a --version flag to libcst.tool, single-source version. 2020-02-07 11:51:58 -08:00
Jennifer Taylor
60823c6d0a Fix typo. 2020-02-07 11:38:33 -08:00
Jennifer Taylor
3ec41e3a92 Bump LibCST to new release 0.3.1. 2020-02-06 13:12:50 -08:00
Jimmy Lai
8c77811d70 [metadata][QualifiedNameProvider] don't provide qualified name for names in Attribute().attr 2020-02-05 11:41:00 -08:00
Jimmy Lai
b5746a499d add get_full_name_for_node_or_raise helper 2020-02-04 17:16:49 -08:00
Jennifer Taylor
28171f8489 Add decorator support to get_full_name helper. 2020-02-04 14:05:49 -08:00
Jennifer Taylor
47337c6bcc Add an init file so coverage will recognize helper tests. 2020-02-03 10:30:29 -08:00
Jennifer Taylor
7d89943afc Add "Decorator" special-case support to template parsers. 2020-02-03 10:30:29 -08:00
Jennifer Taylor
351063a802 Add support for SubscriptElement, Slice and Index to templates. 2020-02-03 10:30:29 -08:00
Jennifer Taylor
63f7c5a5d8 Fix typing issue with subscript elements where visitors of Index and Slice could not return each other. 2020-02-03 10:30:29 -08:00
Jennifer Taylor
414f8d1673 Add support for suites in templates. 2020-02-03 10:30:29 -08:00
Jennifer Taylor
16fb88bf54 Add support for various statement types into templated parsing. 2020-02-03 10:30:29 -08:00
Jennifer Taylor
510466ce8c Add "Arg" to list of valid types that can be used in templates. 2020-02-03 10:30:29 -08:00
Jennifer Taylor
8c25dc1ae7 Add support for "Parameters" and "Params" nodes in templates. 2020-02-03 10:30:29 -08:00
Jennifer Taylor
0c5f8d83a9 Add "AssignTarget" to valid types that can be templated. 2020-02-03 10:30:29 -08:00
Jennifer Taylor
d58005a8be Add "Annotation" as a supported template replacement type. 2020-02-03 10:30:29 -08:00
Jennifer Taylor
c5d7861ed5 Add "evaluated_value" support to integer types. 2020-01-30 17:07:21 -08:00
Jimmy Lai
14077b8a80 [codemod] add ConvertPercentFormatStringCommand 2020-01-30 06:01:21 +08:00
Jennifer Taylor
379c9d06e7 Add a few print statements so that a user knows that LibCST isn't hanging if metadata calculation takes awhile. 2020-01-28 13:45:18 -08:00
Jennifer Taylor
9bfc6fdd29 Fix dependencies in LibCST setup.py discovered when setting up LibCST from scratch. 2020-01-28 13:45:18 -08:00
Jennifer Taylor
d13be3f2e0 Integrate FullRepoManager into codemod command, allowing codemods to depend on full-repo capable metadata providers. 2020-01-28 13:45:18 -08:00
Jennifer Taylor
761426cfc7 Use new SimpleString helper in a few codemods. 2020-01-28 13:45:03 -08:00
Jimmy Lai
7b474703a0 [doc] fix indentation 2020-01-29 05:25:30 +08:00
Jimmy Lai
c1284f21b1 remove unused TODO comment 2020-01-29 05:22:41 +08:00