Skip to content

Commit fa3543d

Browse files
committed
Fix some pylint errors for double whitespace after class/function
1 parent a0ee99a commit fa3543d

File tree

20 files changed

+35
-0
lines changed

20 files changed

+35
-0
lines changed

Diff for: benchmark/scripts/perf_test_driver/perf_test_driver.py

+1
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ def print_data(self, max_test_len):
5555
def _unwrap_self(args):
5656
return type(args[0]).process_input(*args)
5757

58+
5859
BenchmarkDriver_OptLevels = ['Onone', 'O', 'Ounchecked']
5960

6061

Diff for: tools/SourceKit/bindings/python/sourcekitd/capi.py

+3
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,7 @@ def from_id(id):
206206
def __repr__(self):
207207
return 'ErrorKind.%s' % (self.name,)
208208

209+
209210
ErrorKind.CONNECTION_INTERRUPTED = ErrorKind(1)
210211
ErrorKind.REQUEST_INVALID = ErrorKind(2)
211212
ErrorKind.REQUEST_FAILED = ErrorKind(3)
@@ -294,6 +295,7 @@ def from_id(id):
294295
def __repr__(self):
295296
return 'VariantType.%s' % (self.name,)
296297

298+
297299
VariantType.NULL = VariantType(0)
298300
VariantType.DICTIONARY = VariantType(1)
299301
VariantType.ARRAY = VariantType(2)
@@ -627,6 +629,7 @@ def get_sourcekitd_library(self):
627629

628630
return library
629631

632+
630633
conf = Config()
631634
conf.lib.sourcekitd_initialize()
632635

Diff for: tools/SourceKit/bindings/python/sourcekitd/request.py

+1
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ def syntax_annotate_text(text):
4141
resp = request_sync(req)
4242
return resp.get_payload().to_python_object()
4343

44+
4445
__all__ = [
4546
'request_sync',
4647
'syntax_annotate_text',

Diff for: utils/SwiftBuildSupport.py

+1
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ def _get_default_source_root():
5656

5757
return result
5858

59+
5960
# Set SWIFT_SOURCE_ROOT in your environment to control where the sources
6061
# are found.
6162
SWIFT_SOURCE_ROOT = os.environ.get(

Diff for: utils/apply-fixit-edits.py

+1
Original file line numberDiff line numberDiff line change
@@ -71,5 +71,6 @@ def main():
7171
args = parser.parse_args()
7272
return apply_edits(args.build_dir_path)
7373

74+
7475
if __name__ == "__main__":
7576
sys.exit(main())

Diff for: utils/bug_reducer/tests/test_funcbugreducer.py

+1
Original file line numberDiff line numberDiff line change
@@ -107,5 +107,6 @@ def test_basic(self):
107107
# the relevant command.
108108
self.assertEquals([], [o for o in output if '-emit-sib' in o])
109109

110+
110111
if __name__ == '__main__':
111112
unittest.main()

Diff for: utils/cmpcodesize/cmpcodesize/main.py

+1
Original file line numberDiff line numberDiff line change
@@ -201,5 +201,6 @@ def main():
201201
parsed_arguments.all_sections,
202202
parsed_arguments.list_categories)
203203

204+
204205
if __name__ == '__main__':
205206
main()

Diff for: utils/cmpcodesize/tests/test_list_function_sizes.py

+1
Original file line numberDiff line numberDiff line change
@@ -34,5 +34,6 @@ def test_lists_each_entry(self):
3434
' 100 baz',
3535
])
3636

37+
3738
if __name__ == '__main__':
3839
unittest.main()

Diff for: utils/gyb.py

+2
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ def split_lines(s):
5050
"""
5151
return [l + '\n' for l in s.split('\n')]
5252

53+
5354
# text on a line up to the first '$$', '${', or '%%'
5455
literalText = r'(?: [^$\n%] | \$(?![${]) | %(?!%) )*'
5556

@@ -1148,5 +1149,6 @@ def succ(a):
11481149

11491150
args.target.write(execute_template(ast, args.line_directive, **bindings))
11501151

1152+
11511153
if __name__ == '__main__':
11521154
main()

Diff for: utils/pass-pipeline/scripts/pipelines_build_script.py

+1
Original file line numberDiff line numberDiff line change
@@ -148,5 +148,6 @@ def main():
148148
args = parser.parse_args()
149149
args.func(**vars(args))
150150

151+
151152
if __name__ == "__main__":
152153
main()

Diff for: utils/pass-pipeline/src/pass_pipeline.py

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ def __init__(self, name):
66
def __repr__(self):
77
return "<pass name=%s>" % self.name
88

9+
910
PassListId = 0
1011

1112

Diff for: utils/protocol_graph.py

+2
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ def body_lines(body_text):
7171
body_text, re_flags)
7272
]
7373

74+
7475
# Mapping from protocol to associated type / operator requirements
7576
body = {}
7677

@@ -130,6 +131,7 @@ def parse_protocol(m):
130131
return
131132
graph.setdefault(parent.strip(), set()).add(child)
132133

134+
133135
protocols_and_operators = interpolate(r'''
134136
\bprotocol \s+ (%(identifier)s) \s*
135137
(?::\s*([^{]+))? # refinements

Diff for: utils/resolve-crashes.py

+1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ def execute_cmd(cmd):
1313
print(cmd)
1414
os.system(cmd)
1515

16+
1617
# The regular expression we use to match compiler-crasher lines.
1718
regex = re.compile(
1819
'.*Swift(.*) :: '

Diff for: utils/rusage.py

+3
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
import subprocess
3636
import sys
3737

38+
3839
class MemAction(argparse.Action):
3940
def __init__(self, *args, **kwargs):
4041
super(MemAction, self).__init__(*args, **kwargs)
@@ -51,6 +52,7 @@ def __call__(self, parser, namespace, v, option_string=None):
5152
r = int(v)
5253
setattr(namespace, self.dest, r)
5354

55+
5456
class TimeAction(argparse.Action):
5557
def __init__(self, *args, **kwargs):
5658
super(TimeAction, self).__init__(*args, **kwargs)
@@ -65,6 +67,7 @@ def __call__(self, parser, namespace, v, option_string=None):
6567
r = float(v)
6668
setattr(namespace, self.dest, r)
6769

70+
6871
parser = argparse.ArgumentParser()
6972
parser.add_argument("--mem",
7073
metavar="M",

Diff for: utils/swift-api-dump.py

+1
Original file line numberDiff line numberDiff line change
@@ -322,5 +322,6 @@ def main():
322322
# Remove the .swift file we fed into swift-ide-test
323323
subprocess.call(['rm', '-f', source_filename])
324324

325+
325326
if __name__ == '__main__':
326327
main()

Diff for: utils/swift_build_support/swift_build_support/arguments.py

+8
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ def type_bool(string):
5353
return True
5454
raise argparse.ArgumentTypeError("%r is not a boolean value" % string)
5555

56+
5657
_register(type, 'bool', type_bool)
5758

5859

@@ -70,6 +71,7 @@ def type_shell_split(string):
7071
lex.whitespace += ','
7172
return list(lex)
7273

74+
7375
_register(type, 'shell_split', type_shell_split)
7476

7577

@@ -101,6 +103,7 @@ def type_clang_compiler_version(string):
101103
"must be 'MAJOR.MINOR.PATCH' or "
102104
"'MAJOR.MINOR.PATCH.PATCH'" % string)
103105

106+
104107
_register(type, 'clang_compiler_version', type_clang_compiler_version)
105108

106109

@@ -121,6 +124,7 @@ def type_swift_compiler_version(string):
121124
"must be 'MAJOR.MINOR' or "
122125
"'MAJOR.MINOR.PATCH'" % string)
123126

127+
124128
_register(type, 'swift_compiler_version', type_swift_compiler_version)
125129

126130

@@ -135,6 +139,7 @@ def type_executable(string):
135139
raise argparse.ArgumentTypeError(
136140
"%r is not executable" % string)
137141

142+
138143
_register(type, 'executable', type_executable)
139144

140145
# Actions --------------------------------------------------------------------
@@ -162,6 +167,7 @@ def __call__(self, parser, namespace, values, option_string=None):
162167
arg = str(values)
163168
parser.error('unknown argument: %s' % arg)
164169

170+
165171
_register(action, 'unavailable', _UnavailableAction)
166172

167173

@@ -175,6 +181,7 @@ def __call__(self, parser, namespace, values, option_string=None):
175181
val = old_val + values
176182
setattr(namespace, self.dest, val)
177183

184+
178185
_register(action, 'concat', _ConcatAction)
179186

180187

@@ -198,4 +205,5 @@ def __init__(self,
198205
def __call__(self, parser, namespace, values, option_string=None):
199206
setattr(namespace, self.dest, values)
200207

208+
201209
_register(action, 'optional_bool', _OptionalBoolAction)

Diff for: utils/swift_build_support/swift_build_support/host.py

+2
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ def _darwin_system_memory():
4242
dry_run=False, echo=False,
4343
optional=False).strip().split(" ")[1])
4444

45+
4546
_PER_PLATFORM_SYSTEM_MEMORY = {
4647
('Darwin', 'x86_64'): _darwin_system_memory
4748
}
@@ -76,6 +77,7 @@ def _darwin_max_num_swift_parallel_lto_link_jobs():
7677
# prevents me from swapping on my test machine.
7778
return int((_darwin_system_memory()/1000000000.0 - 3.0)/8.0)
7879

80+
7981
_PER_PLATFORM_MAX_PARALLEL_LTO_JOBS = {
8082
('Darwin', 'x86_64'): (_darwin_max_num_llvm_parallel_lto_link_jobs,
8183
_darwin_max_num_swift_parallel_lto_link_jobs)

Diff for: utils/swift_build_support/swift_build_support/toolchain.py

+2
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@ def _getter(self):
4343
return self.find_tool(*tool)
4444
_getter.__name__ = name
4545
setattr(Toolchain, name, cache_util.reify(_getter))
46+
47+
4648
_register("cc", "clang")
4749
_register("cxx", "clang++")
4850
_register("ninja", "ninja", "ninja-build")

Diff for: utils/swift_build_support/tests/test_cmake.py

+1
Original file line numberDiff line numberDiff line change
@@ -410,5 +410,6 @@ def test_operations(self):
410410
"-DOPT1_1=VAL1",
411411
"-DOPT1_2=VAL2"])
412412

413+
413414
if __name__ == '__main__':
414415
unittest.main()

Diff for: utils/swift_build_support/tests/test_targets.py

+1
Original file line numberDiff line numberDiff line change
@@ -33,5 +33,6 @@ def test_platform_contains(self):
3333
self.assertFalse(platform.contains("fakeCPU-MSDOS"))
3434
self.assertFalse(platform.contains("singleTransistor-fakeOS"))
3535

36+
3637
if __name__ == '__main__':
3738
unittest.main()

0 commit comments

Comments
 (0)