[Lint] Convert all python double quotes to single quotes

* A rather disruptive change but for a few reasons such as easier to read,
   easier type, keep consistent and javascript code uses single quotes.
 * There are a few exceptions for the automated process:
    * Any double quotes in comments
    * Triple double quotes for docstrings
    * Strings containing single quotes are left e.g. "they're"

 * To deal with merge conflicts from feature branches it is best to follow
   these steps for each commit:
     * Create a patch: `git format-patch -1 <sha1>`
     * Edit the patch and replace double quotes with single except those in
       comments or strings containing an unescaped apostrophe.
     * Check the patch `git apply --check <patchfile>` and fix any remaining
       issues if it outputs an error.
     * Apply the patch `git am < <patchfile>`
This commit is contained in:
Calum Lind 2016-11-03 21:26:46 +00:00
commit 3a2ff0c188
231 changed files with 8812 additions and 8812 deletions

View file

@ -34,7 +34,7 @@ import os
import struct
import sys
__version__ = "1.1"
__version__ = '1.1'
MESSAGES = {}
@ -87,14 +87,14 @@ def generate():
koffsets += [l1, o1 + keystart]
voffsets += [l2, o2 + valuestart]
offsets = koffsets + voffsets
output = struct.pack("Iiiiiii",
output = struct.pack('Iiiiiii',
0x950412de, # Magic
0, # Version
len(keys), # # of entries
7 * 4, # start of key index
7 * 4 + len(keys) * 8, # start of value index
0, 0) # size and offset of hash table
output += array.array("i", offsets).tostring()
output += array.array('i', offsets).tostring()
output += ids
output += strs
return output
@ -183,7 +183,7 @@ def make(filename, outfile):
output = generate()
try:
with open(outfile, "wb") as _file:
with open(outfile, 'wb') as _file:
_file.write(output)
except IOError as msg:
print(msg, file=sys.stderr)
@ -202,7 +202,7 @@ def main():
if opt in ('-h', '--help'):
usage(0)
elif opt in ('-V', '--version'):
print("msgfmt.py", __version__, file=sys.stderr)
print('msgfmt.py', __version__, file=sys.stderr)
sys.exit(0)
elif opt in ('-o', '--output-file'):
outfile = arg