LibCST/docs/source
Benjamin Woodruff 42c3f3f267 Add an unsafe_skip_copy option to MetadataWrapper
In certain cases (e.g. inside Instagram's lint framework) we know that
our tree originates from the parser, so we know that there shouldn't be
any duplicate nodes in our tree.

MetadataWrapper exists to copy the tree ensuring that there's no
duplicate nodes.

This diff provides an escape hatch on MetadataWrapper that allows us to
save a little time and avoid a copy when we know that it's safe to skip
the copy.

As part of this, I ran into some issues with `InitVar` and pyre, so I
removed `@dataclass` from the class. This means that this is techincally
a breaking change if someone depended on the MetadataWrapper being an
actual dataclass, but I think this is unlikely. I implemented `__repr__`
and added tests for hashing/equality behavior.
2019-10-29 13:35:38 -07:00
..
_static [doc] use png file and fix typo 2019-09-16 19:53:22 -07:00
_templates [doc] Why libcst? 2019-07-24 12:19:00 -07:00
best_practices.rst Add a best practices section with various recommended practices. 2019-10-23 16:50:47 -07:00
conf.py add binder link to notebook tutorial page 2019-10-01 13:41:29 -07:00
experimental.rst Add a reentrant (incremental) codegen API 2019-10-28 17:23:26 -07:00
index.rst Add a reentrant (incremental) codegen API 2019-10-28 17:23:26 -07:00
matchers.rst Update matchers docs with some clarification based on user feedback. 2019-10-28 18:13:55 -07:00
matchers_tutorial.ipynb Add a tutorial for matchers. 2019-10-01 15:28:58 -07:00
metadata.rst Add an unsafe_skip_copy option to MetadataWrapper 2019-10-29 13:35:38 -07:00
metadata_tutorial.ipynb Update tutorial to use renamed PositionProvider 2019-10-18 16:04:00 -07:00
motivation.rst Add a motivation section for LibCST documentation. 2019-08-01 14:51:00 -07:00
nodes.rst Add documentation to matchers. 2019-10-01 15:28:58 -07:00
parser.rst Include ParserSyntaxError in parser documentation 2019-08-22 13:35:11 -07:00
scope_tutorial.ipynb address review feedback form #94 2019-10-08 15:48:59 -07:00
tutorial.ipynb update import paths in Jupyter notebook 2019-09-16 19:53:22 -07:00
visitors.rst Fix visitor helper function name pattern in docs 2019-10-04 21:40:52 -07:00
why_libcst.rst Lots of work on Why LibCST section 2019-08-06 16:55:08 -07:00