Skip to content

Commit a714475

Browse files
committed
Ran new version of yapf on wpiformat source
1 parent 2e280cb commit a714475

File tree

4 files changed

+19
-18
lines changed

4 files changed

+19
-18
lines changed

Diff for: wpiformat/test/test_config.py

+8-8
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@
55

66
def test_config():
77
config_file = Config(os.path.abspath(os.getcwd()), ".styleguide")
8-
assert config_file.is_modifiable_file(
9-
"." + os.sep + "wpiformat" + os.sep + "javaguidelink.png")
8+
assert config_file.is_modifiable_file("." + os.sep + "wpiformat" + os.sep +
9+
"javaguidelink.png")
1010
assert config_file.is_generated_file("." + os.sep + "wpiformat" + os.sep +
1111
"wpiformat" + os.sep + "cpplint.py")
1212

13-
assert not config_file.is_generated_file(
14-
"." + os.sep + "wpiformat" + os.sep + "diff_cpplint.py")
15-
assert not config_file.is_generated_file(
16-
"." + os.sep + "wpiformat" + os.sep + "update_cpplint.py")
17-
assert not config_file.is_modifiable_file(
18-
"." + os.sep + "wpiformat" + os.sep + "license.txt")
13+
assert not config_file.is_generated_file("." + os.sep + "wpiformat" +
14+
os.sep + "diff_cpplint.py")
15+
assert not config_file.is_generated_file("." + os.sep + "wpiformat" +
16+
os.sep + "update_cpplint.py")
17+
assert not config_file.is_modifiable_file("." + os.sep + "wpiformat" +
18+
os.sep + "license.txt")

Diff for: wpiformat/test/test_licenseupdate.py

+6-5
Original file line numberDiff line numberDiff line change
@@ -133,11 +133,12 @@ def test_licenseupdate():
133133
format(year) + os.linesep + os.linesep + file_appendix, True, True)
134134

135135
# File excluded from license update isn't modified
136-
test.add_input("./Excluded.h",
137-
"/* Copyright (c) Company Name 2011-{}. */".format(year) +
138-
os.linesep + os.linesep + file_appendix)
139-
test.add_output("/* Copyright (c) Company Name 2011-{}. */".format(year) +
140-
os.linesep + os.linesep + file_appendix, False, True)
136+
test.add_input(
137+
"./Excluded.h", "/* Copyright (c) Company Name 2011-{}. */".format(year)
138+
+ os.linesep + os.linesep + file_appendix)
139+
test.add_output(
140+
"/* Copyright (c) Company Name 2011-{}. */".format(year) + os.linesep +
141+
os.linesep + file_appendix, False, True)
141142

142143
# Ensure excluded files won't be processed
143144
config_file = Config(os.path.abspath(os.getcwd()), ".styleguide")

Diff for: wpiformat/wpiformat/__init__.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -317,8 +317,8 @@ def main():
317317
["git", "diff", "--name-only", "master"],
318318
stdout=subprocess.PIPE).stdout.split()
319319
for line in output_list:
320-
changed_file_list.append(
321-
root_path + os.sep + line.strip().decode("ascii"))
320+
changed_file_list.append(root_path + os.sep +
321+
line.strip().decode("ascii"))
322322

323323
# Don't run tasks on modifiable or generated files
324324
work = []

Diff for: wpiformat/wpiformat/cidentlist.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,9 @@ def run_pipeline(self, config_file, name, lines):
4343
extern_str = "(?P<ext_decl>extern \"C(\+\+)?\")\s+(?P<ext_brace>\{)?|"
4444
braces_str = "\{|\}|;|def\s+\w+|\w+\s+\w+\s*(?P<paren>\(\))"
4545
postfix_str = "(?=\s*(;|\{))"
46-
token_regex = regex.compile(
47-
preproc_str + comment_str + string_str + char_str + extern_str +
48-
braces_str + postfix_str)
46+
token_regex = regex.compile(preproc_str + comment_str + string_str +
47+
char_str + extern_str + braces_str +
48+
postfix_str)
4949

5050
EXTRA_POP_OFFSET = 2
5151

0 commit comments

Comments
 (0)