Lines Matching +refs:google +refs:set +refs:c +refs:style
9 .. image:: https://github.com/google/yapf/actions/workflows/ci.yml/badge.svg
10 :target: https://github.com/google/yapf/actions
13 .. image:: https://coveralls.io/repos/google/yapf/badge.svg?branch=main
14 :target: https://coveralls.io/r/google/yapf?branch=main
29 conforms to the style guide, even if the original code didn't violate the
30 style guide. The idea is also similar to the `'gofmt' <https://golang.org/cmd/
33 whenever modifications are made, the style remains consistent throughout the
34 project and there's no point arguing about style in every code review.
37 programmer would write if they were following the style guide. It takes away
94 [--style STYLE] [--style-help] [--no-local-style] [-p]
113 --style STYLE specify formatting style: either a style name (for
114 example "pep8" or "google"), or the name of a file
115 with style settings. The default is pep8 unless a
116 .style.yapf or setup.cfg or pyproject.toml file
120 --style-help show style settings and exit; this output can be saved
121 to .style.yapf to make your settings permanent
122 --no-local-style don't search for local style definition
166 Formatting style
169 The formatting style used by YAPF is configurable and there are many "knobs"
170 that can be used to tune how YAPF does formatting. See the ``style.py`` module
173 To control the style, run YAPF with the ``--style`` argument. It accepts one of
174 the predefined styles (e.g., ``pep8`` or ``google``), a path to a configuration
175 file that specifies the desired style, or a dictionary of key/value pairs.
178 with a ``[style]`` heading. For example:
182 [style]
188 custom style is based on (think of it like subclassing). Four
192 - ``google`` (based off of the `Google Python Style Guide`_)
196 .. _`Google Python Style Guide`: https://github.com/google/styleguide/blob/gh-pages/pyguide.md
198 See ``_STYLE_NAME_TO_FACTORY`` in style.py_ for details.
200 .. _style.py: https://github.com/google/yapf/blob/main/yapf/yapflib/style.py
207 --style='{based_on_style: pep8, indent_width: 2}'
209 This will take the ``pep8`` base style and modify it to have two space
212 YAPF will search for the formatting style in the following manner:
215 2. In the ``[style]`` section of a ``.style.yapf`` file in either the current
221 5. In the ``[style]`` section of a ``~/.config/yapf/style`` file in your home
224 If none of those files are found, the default style is used (PEP8).
237 'c':927}
254 x = {'a': 37, 'b': 42, 'c': 927}
289 A ``style_config`` argument: Either a style name or a path to a file that contains
290 formatting style settings. If None is specified, use the default style
291 as set in ``style.DEFAULT_STYLE_FACTORY``.
356 [--style STYLE] [--binary BINARY]
379 --style STYLE specify formatting style: either a style name (for
380 example "pep8" or "google"), or the name of a file
381 with style settings. The default is pep8 unless a
382 .style.yapf or setup.cfg or pyproject.toml file
421 c = (1 + 2) * (3 - 4)
432 c = (1+2) * (3-4)
474 is set. For example:
499 The style for continuation alignment. Possible values are:
762 Split before a dictionary or set generator (comp_for). For example, note
777 foo = ('This is a really long string: {}, {}, {}, {}'.format(a, b, c, d))
784 .format(a, b, c, d))
883 with development. It will format things to coincide with the style guide, but
912 ``dedent_closing_brackets`` in your style. Note that in this case all
914 that style. This provides consistency across the formatted codebase.
1004 easily determine if a splitting decision will violate one of the style