[gardening] Fix violations of non-controversial PEP8 rules.

Fixes:
* blank line at end of file
* closing bracket does not match indentation of opening bracket's line
* continuation line over-indented for hanging indent
* continuation line over-indented for visual indent
* continuation line unaligned for hanging indent
* inline comment should start with '# '
* missing whitespace around arithmetic operator
* missing whitespace around bitwise or shift operator
* multiple imports on one line
* multiple spaces after ':'
* multiple spaces after operator
This commit is contained in:
practicalswift
2016-01-16 00:43:59 +01:00
parent 2fa08e3e30
commit 22d043fcc0
23 changed files with 70 additions and 61 deletions

View File

@@ -257,8 +257,9 @@ class UnicodeTrieGenerator(object):
# An array of BMP data blocks.
self.BMP_data = [
[ -1 for i in range(0, 1 << self.BMP_data_offset_bits) ]
for i in range(0, 1 << self.BMP_first_level_index_bits) ]
[-1 for i in range(0, 1 << self.BMP_data_offset_bits)]
for i in range(0, 1 << self.BMP_first_level_index_bits)
]
# A mapping from supp first-level index to an index of the second-level
# lookup table.
@@ -268,13 +269,15 @@ class UnicodeTrieGenerator(object):
# table is a mapping from a supp second-level index to supp data block
# index.
self.supp_lookup2 = [
[ j for j in range(i << self.supp_second_level_index_bits, (i + 1) << self.supp_second_level_index_bits) ]
for i in range(0, self.supp_first_level_index_max + 1) ]
[j for j in range(i << self.supp_second_level_index_bits, (i + 1) << self.supp_second_level_index_bits)]
for i in range(0, self.supp_first_level_index_max + 1)
]
# An array of supp data blocks.
self.supp_data = [
[ -1 for i in range(0, 1 << self.supp_data_offset_bits) ]
for i in range(0, (self.supp_first_level_index_max + 1) * (1 << self.supp_second_level_index_bits)) ]
[-1 for i in range(0, 1 << self.supp_data_offset_bits)]
for i in range(0, (self.supp_first_level_index_max + 1) * (1 << self.supp_second_level_index_bits))
]
def splat(self, value):
for i in range(0, len(self.BMP_data)):
@@ -602,4 +605,3 @@ def get_grapheme_cluster_break_tests_as_unicode_scalars(grapheme_break_test_file
result += [ test ]
return result