File tree 2 files changed +8
-9
lines changed
2 files changed +8
-9
lines changed Original file line number Diff line number Diff line change 1
1
[style]
2
- based_on_style = chromium
2
+ based_on_style = pep8
3
+ indent_width = 2
4
+ column_limit = 80
Original file line number Diff line number Diff line change @@ -5262,10 +5262,6 @@ def CMDformat(parser, args):
5262
5262
if sys .platform .startswith ('win' ):
5263
5263
yapf_tool += '.bat'
5264
5264
5265
- # If we couldn't find a yapf file we'll default to the chromium style
5266
- # specified in depot_tools.
5267
- chromium_default_yapf_style = os .path .join (depot_tools_path ,
5268
- YAPF_CONFIG_FILENAME )
5269
5265
# Used for caching.
5270
5266
yapf_configs = {}
5271
5267
for f in python_diff_files :
@@ -5295,11 +5291,12 @@ def CMDformat(parser, args):
5295
5291
yapfignore_patterns )
5296
5292
5297
5293
for f in filtered_py_files :
5298
- yapf_config = _FindYapfConfigFile (f , yapf_configs , top_dir )
5299
- if yapf_config is None :
5300
- yapf_config = chromium_default_yapf_style
5294
+ yapf_style = _FindYapfConfigFile (f , yapf_configs , top_dir )
5295
+ # Default to pep8 if not .style.yapf is found.
5296
+ if not yapf_style :
5297
+ yapf_style = 'pep8'
5301
5298
5302
- cmd = [yapf_tool , '--style' , yapf_config , f ]
5299
+ cmd = [yapf_tool , '--style' , yapf_style , f ]
5303
5300
5304
5301
has_formattable_lines = False
5305
5302
if not opts .full :
You can’t perform that action at this time.
0 commit comments