add readme and .style.yapf for formatting
This commit is contained in:
parent
d24b667e73
commit
028eef63a8
2 changed files with 47 additions and 0 deletions
26
crawler/README.md
Normal file
26
crawler/README.md
Normal 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"]
|
||||
}
|
||||
```
|
||||
Loading…
Add table
Add a link
Reference in a new issue