Commit graph

17 commits

Author SHA1 Message Date
Zsolt Dollenstein
c44ff0500b
Fix license headers (#560)
* Facebook -> Meta

* remove year from doc copyright
2021-12-28 11:55:18 +00:00
John Reese
10c3aa09a7
Upgrade to µsort 1.0.0rc1, and apply formatting changes (#565)
* Upgrade to usort==1.0.0rc1

* Apply sorting changes from usort 1.0.0rc1

* reapply codegen

Co-authored-by: Zsolt Dollenstein <zsol.zsol@gmail.com>
2021-12-21 14:55:04 -08:00
Steven Troxler
5e1e3fe970
The ufmt tool combines usort and black with a consistent wrapper, (#515)
which ensures we won't have inconsistent black-vs-isort errors
going forward. We can always format by running `ufmt format .`
at the root, and check with `ufmt check .` in our CI actions.
2021-08-25 20:39:29 -04: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
64e298b2cc Fix batchable visitor not calling attribute visitors. 2019-11-14 11:28:15 -08:00
Jennifer Taylor
b3253de9b8 Update black to git commit that fixes 3.8 support. 2019-10-24 15:25:21 -07:00
Jennifer Taylor
fb4785cfa1 Bump pyre version to 0.0.30.
This introduces a few new gotchas (namely attribute access and a bug with
Union[Callable]), but it also removes a whole host of pyre-fixmes and gets us
updated to a release of pyre that came out after May.
2019-09-25 12:04:33 -07:00
Jennifer Taylor
fc430343b5 Fix internal underscore convention.
Standardize on the convention that private modules (those we don't expect people to directly import) are prefixed with an underscore. Everything under a directory/module that has an underscore is considered private, unless it is re-exported from a non-underscored module. Most things are exported from libcst directly, but there are a few things in libcst.tool, libcst.codegen and libcst.metadata that are namedspaced as such.
2019-09-17 13:52:42 -07:00
Jimmy Lai
213b335cd5 move metadata providers its data structures to libcst.metadata 2019-09-16 19:53:22 -07:00
Jennifer Taylor
f14b4fa37c Add codegen for visit_* and leave_* methods on CSTTransform and CSTVisitor.
This allows Pyre to typecheck returns inside visitors for us.
2019-08-28 13:28:29 -07:00
Ray Zeng
63ff16cb47 Add more metadata documentation 2019-08-16 10:34:30 -07:00
Ray Zeng
79f0ebc2a4 Add sphinx docs to metadata modules 2019-08-16 10:34:30 -07:00
Ray Zeng
a843500b72 Update docstrings to reflect changes in API 2019-08-09 17:27:20 -07:00
Ray Zeng
27d7ce08fd Remove compatibility with old metadata API 2019-08-09 17:27:20 -07:00
Ray Zeng
ac595cb8f2 Rewrite metadata around module wrapper 2019-08-06 16:58:56 -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
Jennifer Taylor
3dec7be6ef Export things from libcst's base__init__.py
Go through and clean up where we export things from in the top level
directories. This is the first pass at cleaning up the public API. In
this diff I clean up all top-level exports that were coming out of .py
files and instead export them from libcst's base module itself.

I also didn't export a few of the things defined in newly underscored
files because they were only used internally.
2019-07-26 12:48:22 -07:00
Renamed from libcst/batched_visitor.py (Browse further)