add readme and .style.yapf for formatting

This commit is contained in:
Viktor Barzin 2025-05-07 20:58:22 +00:00
parent d24b667e73
commit 028eef63a8
No known key found for this signature in database
GPG key ID: 4056458DBDBF8863
2 changed files with 47 additions and 0 deletions

26
crawler/README.md Normal file
View file

@ -0,0 +1,26 @@
# Setup
```bash
pip install -r requirements.txt
```
# Formatting
```bash
yapf --style .style.yapf --recursive .
```
For VSCode - install yapf extension.
Enable formatting using yap and the style file in this repo (there may be an easier way; I put this in my user settings json):
```
{
"[python]": {
"editor.formatOnSaveMode": "file",
"editor.formatOnSave": true,
"editor.defaultFormatter": "eeyore.yapf",
"editor.formatOnType": false
},
"yapf.args": ["--style", "/home/wizard/code/realestate-crawler/crawler/.style.yapf"]
}
```