Commit graph

11 commits

Author SHA1 Message Date
Jennifer Taylor
d3ce7da7ce Drop annotation indicator attribute.
We pass down the correct default annotation indicator to use in 100% of code rendering places, so this becomes a useless bit of initialization. We already set this to a sentinel by default, and the only thing that having an explicit str gives us is the inability to copy an annotation from a param to a return or vice versa. So, out it goes. This means we can't render Annotation by itself, so the test that was using this behavior is out too.
2019-08-05 17:13:17 -07:00
Jennifer Taylor
5a5b3ccd2e Pass through and update docs for all statement nodes. 2019-07-31 17:27:49 -07:00
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
jimmylai
370eec82dc
fix attribute document formatting. 2019-07-31 12:55:19 -07:00
Ray Zeng
a41ab9af91 Calculate syntactic position for statement nodes (5)
Calculate positions for raise, assert, global and nonlocal statements
(and also for op nodes).
2019-07-26 12:48:22 -07:00
Ray Zeng
b9c22a3715 Calculate syntactic position for statement nodes (4)
Calculate positions for with, for and while
2019-07-26 12:48:22 -07:00
Ray Zeng
a42cd37e23 Calculate syntactic position for statement nodes (3)
Calculate positions for assign, function definitions and class
definitions.
2019-07-26 12:48:22 -07:00
Ray Zeng
093acc994b Calculate syntactic position for statement nodes (2)
Calculates positions for try, except, finally and import statements
2019-07-26 12:48:22 -07:00
Ray Zeng
89fb7fe524 Calculate syntactic position for statement nodes (1)
This commit covers most simple statements and if statements.
2019-07-26 12:48:22 -07:00
Jennifer Taylor
818a7e63df Make nodes package private
Now that nodes are imported from the top level, make the nodes
directory private.
2019-07-26 12:48:22 -07:00
Renamed from libcst/nodes/_statement.py (Browse further)