Skip to content

Commit e62ba9b

Browse files
committed
chore: add contributing guide and acknowledgements to readme
1 parent 3158c20 commit e62ba9b

3 files changed

Lines changed: 17 additions & 8 deletions

File tree

.pre-commit-config.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,14 @@ repos:
88
hooks:
99
- id: cargo-fix
1010
- id: cargo-fmt
11+
- repo: https://github.com/jvllmr/pre-commit-prettier
12+
rev: v3.4.2
13+
hooks:
14+
- id: prettier
1115
- repo: https://github.com/astral-sh/ruff-pre-commit
1216
rev: "v0.8.4"
1317
hooks:
1418
- id: ruff
1519
args:
1620
- --fix
1721
- id: ruff-format
18-

CONTRIBUTING.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Contributing to rustpython-unparser
2+
3+
See [README](https://github.com/jvllmr/rustpython-unparser#contributing)

README.md

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,16 @@
11
# rustpython-unparser
22

3-
> [!IMPORTANT]
4-
> rustpython-unparser is in early development and WIP.
5-
63
A complete unparser for rustpython-parser ASTs.
74

5+
## Acknowledgement
6+
7+
I created this library because I quickly needed a way to turn rustpython-parser ASTs back to some form of Python source code. Since the unparser contained within rustpython-ast only supports expressions and not statements, I started implementing my own unparser by taking heavy inspiration from rustpython's unparser and the unparser in the python standard library. Therefore, most of credit goes to the teams behind the ast standard library module and the RustPython team. I only glued the parts I needed together to a complete unparser in this repository.
8+
9+
## Contributing
10+
11+
You can already help a lot by reporting issues with generated code. If you find an issue,please provide example code of the original source and the unparsed source with a concise explanation.
12+
13+
If you would like to fix the issue yourself, you can create an example in one of the matching files in `test_files` or create a new file with your example if you think your example does not fit into any of the existing files. Then you can run the tests with `cargo t` and verify your changes by viewing your unparse example in the `test_files_unparsed` directory. After verifying your changes you can create a Pull Request. If your change is linked to a GitHub issue, please provide a comment in the form of `# <link to github issue>` next to your example.
814

915
## Simple usage example
1016

@@ -23,7 +29,4 @@ fn main() {
2329
let new_source = unparser.source;
2430
// ...
2531
}
26-
27-
28-
29-
```
32+
```

0 commit comments

Comments
 (0)