Skip to content

Commit a983f43

Browse files
authored
Add format and cformat modules from RustPython (#24)
* Add `format` and `cformat` modules from `RustPython` * Introduce `rustpython-format` crate * Remove unused dependencies
1 parent 947fb53 commit a983f43

File tree

9 files changed

+2297
-15
lines changed

9 files changed

+2297
-15
lines changed

Cargo.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,14 @@ include = ["LICENSE", "Cargo.toml", "src/**/*.rs"]
1111
[workspace]
1212
resolver = "2"
1313
members = [
14-
"ast", "core", "literal", "parser",
14+
"ast", "core", "format", "literal", "parser",
1515
"ruff_text_size", "ruff_source_location",
1616
]
1717

1818
[workspace.dependencies]
19-
rustpython-ast = { path = "ast", version = "0.2.0", default-features = false }
20-
rustpython-parser-core = { path = "core", version = "0.2.0", default-features = false }
21-
rustpython-literal = { path = "literal", version = "0.2.0" }
19+
rustpython-ast = { path = "ast", default-features = false }
20+
rustpython-parser-core = { path = "core", default-features = false }
21+
rustpython-literal = { path = "literal" }
2222

2323
ahash = "0.7.6"
2424
anyhow = "1.0.45"

ast/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ version = "0.2.0"
44
description = "AST definitions for RustPython"
55
authors = ["RustPython Team"]
66
edition = "2021"
7-
repository = "https://github.com/RustPython/RustPython"
7+
repository = "https://github.com/RustPython/Parser/"
88
license = "MIT"
99

1010
[features]

core/Cargo.toml

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,15 @@ description = "RustPython parser data types."
44
version = "0.2.0"
55
authors = ["RustPython Team"]
66
edition = "2021"
7-
repository = "https://github.com/RustPython/RustPython"
7+
repository = "https://github.com/RustPython/Parser/"
88
license = "MIT"
99

1010
[dependencies]
11-
itertools = { workspace = true }
12-
num-bigint = { workspace = true }
13-
num-complex = { workspace = true }
14-
1511
# ruff dependency shouldn't be placed out of this crate
1612
ruff_text_size = { path = "../ruff_text_size" }
1713
ruff_source_location = { path = "../ruff_source_location", optional = true }
1814

1915
serde = { version = "1.0.133", optional = true, default-features = false, features = ["derive"] }
20-
lz4_flex = "0.9.2"
2116

2217
[features]
2318
default = []

format/Cargo.toml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
[package]
2+
name = "rustpython-format"
3+
edition = "2021"
4+
version = "0.2.0"
5+
description = "Format helpers for RustPython"
6+
authors = ["RustPython Team"]
7+
repository = "https://github.com/RustPython/Parser/"
8+
license = "MIT"
9+
10+
[dependencies]
11+
rustpython-literal = { workspace = true }
12+
13+
bitflags = "2.2.1"
14+
itertools = "0.10.5"
15+
num-bigint = { workspace = true }
16+
num-traits = { workspace = true }

0 commit comments

Comments
 (0)