Commit graph

13 commits

Author SHA1 Message Date
Zsolt Dollenstein
744d6fd3cd
Allow no whitespace between lambda keyword and params in certain cases
Python accepts code where `lambda` follows a `*`, so this PR relaxes validation rules for Lambdas.

Raised in #930.
2023-05-27 20:21:24 +01:00
Zsolt Dollenstein
9925117391
Support whitespace after ParamSlash (#713)
* add whitespace_after field to ParamSlash
* codegen
2022-06-26 09:42:37 +01:00
Zsolt Dollenstein
c44ff0500b
Fix license headers (#560)
* Facebook -> Meta

* remove year from doc copyright
2021-12-28 11:55:18 +00:00
jimmylai
c023fa7c4c
[typing] enable Pyre strict mode by default (#313)
Co-authored-by: Jimmy Lai <jimmylai@fb.com>
2020-06-12 18:24:18 -07:00
Jennifer Taylor
fdd5cbbfe6 Implement parsing of posonly param indicator ('/'). This brings us to full 3.8 compatibility. 2020-01-17 10:57:48 -08:00
Jennifer Taylor
6eb6ec7b1d Add posonly parameter support to Parameters node.
This is part one of a two-part change to support the posonly param indicator "/".
2020-01-15 11:18:12 -08:00
Jimmy Lai
b8fd1a78e4 Merge branch 'master' of github.com:Instagram/LibCST into full_repo_manager 2019-12-12 16:21:16 -08:00
Jennifer Taylor
c9b10fe427 Deprecate "default_params" on Parameters in preparation for 3.8 position-only params. 2019-12-03 10:56:01 -08:00
Benjamin Woodruff
e1c1d450ae Export CodePosition and CodeRange from metadata
While these classes are used by the codegen implementation, conceptually
they're part of `libcst.metadata`, so we should export them from
`libcst.metadata` instead of the top-level `libcst` package.
2019-10-18 14:30:33 -07:00
Ray Zeng
2e8c3b6756 Convert CodeRange.create to a constructor to clean up docs 2019-08-16 10:34:30 -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
Jennifer Taylor
1190dc8a2f Import parser from the top level
This was a pain, because apparently we can't refer to
"static_analysis.libcst" as a module before its finished executing, due
to https://bugs.python.org/issue25294. To combat this, I had to change
to direct importing inside parser, which was a bit of a pain due to the
number of nodes used. But, it works.
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/tests/test_lambda.py (Browse further)