Skip to content

Commit

Permalink
python.md: Add info about YAPF bugs and editor integrations
Browse files Browse the repository at this point in the history
Bug: 846432
Change-Id: Ie618f4e8f978bec4134b1b163e46f087d3101967
Reviewed-on: https://chromium-review.googlesource.com/c/1356238
Reviewed-by: Nico Weber <thakis@chromium.org>
Commit-Queue: Nico Weber <thakis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#612658}
  • Loading branch information
agrieve authored and Commit Bot committed Nov 30, 2018
1 parent 27d04cc commit 1a1b906
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions styleguide/python/python.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,18 +33,18 @@ greater virtue than compliance.)
### pylint
[Depot tools](http://commondatastorage.googleapis.com/chrome-infra-docs/flat/depot_tools/docs/html/depot_tools.html)
contains a local copy of pylint, appropriately configured.
* Directories need to opt into pylint presumbit checks via:
* Directories need to opt into pylint presumbit checks via:
`input_api.canned_checks.RunPylint()`.

### YAPF
[YAPF](https://github.com/google/yapf) is a Python formatter that can be used via:
[YAPF](https://github.com/google/yapf) is the Python formatter used by:

```sh
git cl format --python
```

Directories can opt into enforcing YAPF styling by adding `.style.yapf` file
with the following contents:
Directories can opt into enforcing auto-formatting by adding a `.style.yapf`
file with the following contents:
```
[style]
based_on_style = chromium
Expand All @@ -53,4 +53,11 @@ based_on_style = chromium
Entire files can be formatted (rather than just touched lines) via:
```sh
git cl format --python --full
```
```

#### Bugs
* Are tracked here: https://github.com/google/yapf/issues.
* For Chromium-specific bugs, please discuss on `python@chromium.org`.

#### Editor Integration
See: https://github.com/google/yapf/tree/master/plugins

0 comments on commit 1a1b906

Please sign in to comment.