Jimmy Lai
3965e4601b
[doc] add docstring to QualifiedName
2019-10-09 11:32:08 -07:00
Jimmy Lai
5f8f5c5624
address review feedback form #94
2019-10-08 15:48:59 -07:00
Jimmy Lai
b690c591e5
[doc] add Scope Analysis tutorial
2019-10-08 15:48:59 -07:00
Jimmy Lai
9e7a9879ea
[doc] fix expression context usage in scope api and explain access don't handle simple string typing access
2019-10-08 15:48:59 -07:00
Jimmy Lai
dea7c20794
add warning box to clarify Scope metadata only handles local variable
2019-10-08 15:48:59 -07:00
Jimmy Lai
9f8e69b1b3
[doc] use libcst.metadata for referencing metadata classes and add docstring for Scope magic functions
2019-10-08 15:48:59 -07:00
Jimmy Lai
c9dc3bfa70
address review feedback in #94
2019-10-08 15:48:59 -07:00
Jimmy Lai
13637b7d58
add docs for Assignments and Accesses
2019-10-08 15:48:59 -07:00
Jimmy Lai
855232e24f
test Access.referents and Assignment.references
2019-10-08 15:48:59 -07:00
Jimmy Lai
65cc4d23bd
add test case for Assignments and Accesses
2019-10-08 15:48:59 -07:00
Jimmy Lai
392426d6bd
add Scope.record_access and Access.record_assignment
2019-10-08 15:48:59 -07:00
Jimmy Lai
ee14c48e46
add Scope.assignments and Scope.accesses
2019-10-08 15:48:59 -07:00
Jimmy Lai
7a2d0048c7
add deprecation message to Assignment.accesses
2019-10-08 15:48:59 -07:00
Jimmy Lai
120fd04ce2
rename Assignment.accesses as Assignment.references and add Accesses/Assignments
2019-10-08 15:48:59 -07:00
Christopher Hunt
6520d25816
Fix visitor helper function name pattern in docs
2019-10-04 21:40:52 -07:00
Jimmy Lai
c92bc02d8c
rewrite ExpressionContextProvider to handle nested List/Tuple and Attribute
2019-10-04 15:16:55 -07:00
Jennifer Taylor
08b6657db2
Bump version to 0.2.0, update changelog.
2019-10-04 13:13:30 -07:00
Jennifer Taylor
8a8ea4b27b
Upgrade Pyre to 0.32.
...
This fixes a TODO, removes several ignore statements and most importantly, addresses a massive speed regression triggered by importing matchers.
2019-10-04 11:05:37 -07:00
Jennifer Taylor
27b5a1d286
Improve removing nodes from parents in LibCST.
...
Add a RemoveFromParent() function as a convenience to returning RemovalSentinel.REMOVE.
Introduce a `deep_remove()` on CSTNode analogous to `deep_replace()` but for removing.
2019-10-02 15:43:48 -07:00
Jennifer Taylor
2383bea74b
Export ProviderT so it can be used to type METADATA_DEPENDENCIES.
2019-10-02 15:15:18 -07:00
Jennifer Taylor
9fa2612673
Implement deep_replace helper on CSTNode.
2019-10-02 14:00:20 -07:00
Jimmy Lai
7b96b070ca
Organize document menu as three parts: introduction, tutorial and reference
2019-10-02 12:26:35 -07:00
Jennifer Taylor
32037efab9
Add a tutorial for matchers.
2019-10-01 15:28:58 -07:00
Jennifer Taylor
e8c19a983c
Fix issue with matchers that combine both @call and @visit decorators.
2019-10-01 15:28:58 -07:00
Jennifer Taylor
90ec997687
Fix warning in docs creation relating to scope provider.
2019-10-01 15:28:58 -07:00
Jennifer Taylor
e2868f703b
Add documentation to matchers.
2019-10-01 15:28:58 -07:00
Jennifer Taylor
271566bdbf
Add a .remove() method to CSTNode as a convenience to returning RemovalSentinel.REMOVE
2019-10-01 15:28:58 -07:00
Jimmy Lai
1488126df5
fix import asname support in get_qualified_names_for and add tests/docs
2019-10-01 14:24:20 -07:00
Jimmy Lai
826765bd93
add QualifiedNameProvider
2019-10-01 14:24:20 -07:00
Jimmy Lai
0948108dce
add binder link to notebook tutorial page
2019-10-01 13:41:29 -07:00
Jimmy Lai
cd25f15ff7
consolidate metadata imports
2019-10-01 13:40:24 -07:00
Jimmy Lai
fc2d8f8697
avoid redefine builtin function range
2019-09-30 14:38:25 -07:00
Jimmy Lai
9945a9b970
merge isinstance calls to be more simple and fast
2019-09-30 14:38:25 -07:00
Jimmy Lai
6680c2d05f
add nested function/class test cases and documents to Qualified Name Metadata
2019-09-30 12:03:19 -07:00
Jimmy Lai
1bdce26bf3
add QualifiedNameSource.BUILTIN and address review comments
2019-09-30 12:03:19 -07:00
Jimmy Lai
50b3c61794
add docs of get_qualified_names_for
2019-09-30 12:03:19 -07:00
Jimmy Lai
9fcf84cf2c
add QualifiedName and QualifiedNameSource enum
2019-09-30 12:03:19 -07:00
Jimmy Lai
881348df27
add get_fully_qualified_names_for tests for subscript and SimpleString typing
2019-09-30 12:03:19 -07:00
Jimmy Lai
e24ca294b6
use LocalScope in ScopeVisitor._new_scope to simplify typing
2019-09-30 12:03:19 -07:00
Jimmy Lai
894a0f7424
add local assignment (non-import assignment) supports to get_fully_qualified_names_for
2019-09-30 12:03:19 -07:00
Jimmy Lai
3123691788
add helper Scope.get_fully_qualified_names_for
2019-09-30 12:03:19 -07:00
jimmylai
4ad2139c8c
Add metadata provider to future in README.
2019-09-27 13:55:26 -07:00
Jennifer Taylor
dd99a424dc
Add future section, based on questions received.
2019-09-27 13:55:26 -07:00
Jennifer Taylor
42760505bf
Clarify LibCST license.
...
Make explicit in the LICENSE and README files the exact files that are not licensed under MIT since being forked. These files already have license information in their headers, but it is always good to be explicit at the top level as well. Also include a copy of the licenses in the LICENSE file to conform with requirements.
2019-09-27 13:55:26 -07:00
Jennifer Taylor
85417b957d
Initial export of matchers into LibCST.
2019-09-27 11:39:11 -07:00
Jimmy Lai
f2303cecd3
remove accidentally committed files.
2019-09-26 17:39:16 -07:00
Jimmy Lai
4cde536678
add more test cases to ParentNodeProviderTest
2019-09-26 17:39:16 -07:00
Jimmy Lai
db6092dffd
add docs of ParentNodeProvider
2019-09-26 17:39:16 -07:00
Jimmy Lai
132549db56
add parent node metadata provider
2019-09-26 17:39:16 -07:00
Jimmy Lai
643acd7771
remove redundant constructor
2019-09-26 17:39:16 -07:00