Commit graph

1099 commits

Author SHA1 Message Date
Tim Hatch
d9f0666ae9 Allow no space after except when followed by parens.
Fixes #249
2020-03-05 07:13:32 -08:00
Tim Hatch
ef56771900 Add comment to docs 2020-03-05 07:00:24 -08:00
Tim Hatch
11b98551c7 Improve KeyError on missing metadata.
Fixes #250
2020-03-05 06:57:48 -08:00
Tim Hatch
5651bc94db Silence convert_argslist is too complex 2020-03-05 06:35:39 -08:00
Jimmy Lai
01f619755b [release] Bump LibCST to new release 0.3.3. 2020-03-05 11:37:37 +00:00
Jimmy Lai
4544539485 [helper] add get_docstring() to Module, ClassDef and FunctionDef 2020-03-05 01:20:20 +00:00
Jimmy Lai
0d6f2c6d13 Merge branch 'jimmylai-optimize_scope_provider_infer_access' 2020-03-03 15:49:09 +00:00
Jimmy Lai
1134e17df8 Merge branch 'optimize_scope_provider_infer_access' of https://github.com/jimmylai/LibCST into jimmylai-optimize_scope_provider_infer_access 2020-03-03 15:48:59 +00:00
jimmylai
8e9140aaa6
Merge branch 'master' into optimize_scope_provider_infer_access 2020-03-03 15:47:22 +00:00
Jimmy Lai
927b192ed0 merge optimize_scope_provider_infer_access to master 2020-03-03 15:44:59 +00:00
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
Zsolt Dollenstein
a7200dc230 Make get_qualified_names_for and __contains__ not change the scope 2020-03-02 13:47:06 +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