LibCST/libcst
Jennifer Taylor 60763fc5dc Implement an ensure_type helper
We already have several places in unit tests that need this, as well
as a spot in an existing codemod that could benefit from it. So,
implement ensure_type which can be used to refine the type of a node to
an exact node type. I purposefully left the node type as 'object'
instead of libcst.CSTNode so that it could be used with RemovalSentinel
or MaybeSentinel without needing to import these.
2019-07-23 13:13:53 -07:00
..
metadata Inspect MRO chain and merge metadata dependencies 2019-07-22 20:05:07 -07:00
nodes Implement an ensure_type helper 2019-07-23 13:13:53 -07:00
parser Fix flake8 errors 2019-07-22 20:05:07 -07:00
testing Initial export of LibCST to github. 2019-05-31 14:16:53 -07:00
tests Fix batched vistor dependency resolution 2019-07-22 20:04:37 -07:00
__init__.py pyre-strict libcst/__init__.py and libcst/tool.py 2019-07-22 19:53:49 -07:00
_add_slots.py Export CodePosition/CodeRange; fix pickle with add_slots 2019-07-22 20:05:07 -07:00
_maybe_sentinel.py Better serialization for MaybeSentinel 2019-06-03 15:43:55 -07:00
_removal_sentinel.py Initial export of LibCST to github. 2019-05-31 14:16:53 -07:00
_tabs.py Initial export of LibCST to github. 2019-05-31 14:16:53 -07:00
_type_enforce.py Fix flake8 errors 2019-07-22 20:05:07 -07:00
batched_visitor.py Inspect MRO chain and merge metadata dependencies 2019-07-22 20:05:07 -07:00
exceptions.py Add metadata dependencies to CSTVisitor and add metadata runner 2019-07-22 19:53:49 -07:00
helpers.py Implement an ensure_type helper 2019-07-23 13:13:53 -07:00
matchers.py Define batchable visitors 2019-07-22 20:04:37 -07:00
tool.py Fix flake8 errors 2019-07-22 20:05:07 -07:00
visitors.py Convert metadata computation to use batched visitors 2019-07-22 20:04:37 -07:00