From 1a1b9066b334be375ff937378b0670cb7941b92c Mon Sep 17 00:00:00 2001 From: agrieve Date: Fri, 30 Nov 2018 15:47:22 +0000 Subject: [PATCH] python.md: Add info about YAPF bugs and editor integrations Bug: 846432 Change-Id: Ie618f4e8f978bec4134b1b163e46f087d3101967 Reviewed-on: https://chromium-review.googlesource.com/c/1356238 Reviewed-by: Nico Weber Commit-Queue: Nico Weber Cr-Commit-Position: refs/heads/master@{#612658} --- styleguide/python/python.md | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/styleguide/python/python.md b/styleguide/python/python.md index 0f30b544ad3644..f6cde0e7d97703 100644 --- a/styleguide/python/python.md +++ b/styleguide/python/python.md @@ -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