Python Formatter is a Python library for reformatting Python code. Python Formatter works with Python 3.8 and under the guidelines of PEP8, but can be customized to the developer needs.
-
Clone the repository:
git clone https://github.com/waadnakhleh/pythonformatter.git
-
Install the dependencies:
pip install -r requirements.txt
import _rewrite
_rewrite.rewrite(file_name)
- Choose an issue from our issues list.
- Make sure you have the latest version.
- Make the changes.
- Run black.
- git add <changed_file>
- git commit -m "good commit message"
- git push origin <branch_name>
We follow the set of rules provided by PEP8. But since we run black on the code just make sure to:
- Variable and function names should be in snake_case format.
- Class names should be in CamelCase format.
- Clear variable names (no ugly shortcuts).
- Document your code clearly using docstrings.
- Python documentation for ast module
- Unofficial expanded documentation
- Useful article about Python ast module
We don't really have a license. If we ever compete with other code formatters it will be MIT.