Commit graph

10 commits

Author SHA1 Message Date
Jennifer Taylor
29199ca764 Update documentation on base nodes in statement. 2019-07-31 17:27:49 -07:00
Benjamin Woodruff
88cb0cb88e Remove BaseAtom
I added this originally because it's part of Python's grammar, but since
we merged parenthesis and friends into expressions instead of forming
separate nodes, BaseAtom doesn't have much use.

This fixes also a few bugs:
- A decorator requires a `dotted_name`, so it can only take a `Name` or
  an `Attribute` node, not any atom.
- A `Call` node's function can be any expression, not just a fixed list
  of `BaseExpression` subclasses.
2019-07-31 13:34:07 -07:00
Jennifer Taylor
ebb4681258 Separate operators into groups, add basic description to all existing groups. 2019-07-30 17:36:51 -07:00
Benjamin Woodruff
cf2dfa5ee6 Define DictComp node
This defines the node and adds tests for it, but doesn't implement the
parser for it. That will come in a later PR.
2019-07-30 15:53:07 -07:00
Benjamin Woodruff
c0ac3d7049 Switch from automodule to autoclass everywhere
- Now that we're exporting everything from the top-level libcst package,
  automodule makes a mess of things.
- While it does create more boilerplate, using autoclass/autofunction
  instead of automodule gives us a lot more control over the order in
  which nodes are presented, so we can group them by various categories.

This diff also exports BaseParenthesizableWhitespace, because nodes
refer to it by type, and so it's needed for documentation purposes.
2019-07-29 10:51:59 -07:00
jimmylai
0b8422cee2
add copyright header to custom.css 2019-07-24 19:30:21 -07:00
jimmylai
14ee31dc6a [doc] Why libcst?
* reuse README intro section in doc

* [doc] Why LibCST?

* reuse README intro section in doc

* [doc] Why LibCST?
2019-07-24 12:19:00 -07:00
jimmylai
c0764745fa reuse README intro section in doc 2019-07-23 18:57:47 -07:00
Benjamin Woodruff
27e816059b Change autodoc member order to "bysource"
Without this option, autodoc defaults to ordering all members of
modules and classes alphabetically.

While this is normally fine (and probably desirable), the ordering of
fields in dataclasses is significant, so we need to change this behavior
to preserve the original member ordering.
2019-07-23 17:18:32 -07:00
jimmylai
120cfa9229 add sphinx autodoc templates and docs CI job 2019-07-22 20:05:27 -07:00