Skip to content

Commit f82410f

Browse files
committed
clear instructions on formatting with yapf, remove linting
1 parent 478db26 commit f82410f

File tree

3 files changed

+16
-5
lines changed

3 files changed

+16
-5
lines changed

README.md

+14
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,20 @@ For the **tinygrad** inference engine specifically, there is a separate DEBUG fl
222222
TINYGRAD_DEBUG=2 exo
223223
```
224224

225+
## Formatting
226+
227+
We use [yapf](https://github.com/google/yapf) to format the code. To format the code, first install the formatting requirements:
228+
229+
```sh
230+
pip3 install -e '.[formatting]'
231+
```
232+
233+
Then run the formatting script:
234+
235+
```sh
236+
python3 format.py ./exo
237+
```
238+
225239
## Known Issues
226240

227241
- On some versions of MacOS/Python, certificates are not installed properly which can lead to SSL errors (e.g. SSL error with huggingface.co). To fix this, run the Install Certificates command, usually:

format.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ def run_yapf(target):
2121

2222
def main():
2323
if len(sys.argv) < 2:
24-
print("Usage: python format.py <directory_or_file>")
24+
print("Usage: python3 format.py <directory_or_file> e.g. python3 format.py ./exo")
2525
sys.exit(1)
2626

2727
target = sys.argv[1]

setup.py

+1-4
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,7 @@
3030
]
3131

3232
extras_require = {
33-
"linting": [
34-
"pylint==3.2.6",
35-
"ruff==0.5.5",
36-
"mypy==1.11.0",
33+
"formatting": [
3734
"yapf==0.40.2",
3835
],
3936
"apple_silicon": [

0 commit comments

Comments
 (0)