konstin
63d892f1e4
Implement basic module formatting ( #4784 )
...
* Add Format for Stmt
* Implement basic module formatting
This implements formatting each statement in a module with a hard line break in between, so that we can start formatting statements.
Basic testing is done by the snapshots
2023-06-01 15:25:50 +02:00
konstin
d4027d8b65
Use new formatter infrastructure in CLI and test ( #4767 )
...
* Use dummy verbatim formatter for all nodes
* Use new formatter infrastructure in CLI and test
* Expose the new formatter in the CLI
* Merge import blocks
2023-06-01 11:55:04 +02:00
konstin
9bf168c0a4
Use dummy verbatim formatter for all nodes ( #4755 )
2023-06-01 08:25:26 +00:00
konstin
0945803427
Generate FormatRule definitions ( #4724 )
...
* Generate FormatRule definitions
* Generate verbatim output
* pub(crate) everything
* clippy fix
* Update crates/ruff_python_formatter/src/lib.rs
Co-authored-by: Micha Reiser <micha@reiser.io>
* Update crates/ruff_python_formatter/src/lib.rs
Co-authored-by: Micha Reiser <micha@reiser.io>
* stub out with Ok(()) again
* Update crates/ruff_python_formatter/src/lib.rs
Co-authored-by: Micha Reiser <micha@reiser.io>
* PyFormatContext::{contents, locator} with `#[allow(unused)]`
* Can't leak private type
* remove commented code
* Fix ruff errors
* pub struct Format{node} due to rust rules
---------
Co-authored-by: Julian LaNeve <lanevejulian@gmail.com>
Co-authored-by: Micha Reiser <micha@reiser.io>
2023-06-01 08:38:53 +02:00
Micha Reiser
06bcb85f81
formatter: Remove CST and old formatting ( #4730 )
2023-05-31 08:27:23 +02:00