Commit 1a1b9066 authored by agrieve's avatar agrieve Committed by Commit Bot

python.md: Add info about YAPF bugs and editor integrations

Bug: 846432
Change-Id: Ie618f4e8f978bec4134b1b163e46f087d3101967
Reviewed-on: https://chromium-review.googlesource.com/c/1356238Reviewed-by: default avatarNico Weber <thakis@chromium.org>
Commit-Queue: Nico Weber <thakis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#612658}
parent 27d04cc4
......@@ -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
......@@ -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
```
\ No newline at end of file
```
#### 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
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment