minor on python scripts
* remove not needed imports * remove semicolons
This commit is contained in:
parent
ad87155fd0
commit
368ca30641
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
"usage: gen-harfbuzzcc.py harfbuzz.cc hb-blob.cc hb-buffer.cc ..."
|
"usage: gen-harfbuzzcc.py harfbuzz.cc hb-blob.cc hb-buffer.cc ..."
|
||||||
|
|
||||||
import io, os, re, sys
|
import os, re, sys
|
||||||
|
|
||||||
if len (sys.argv) < 3:
|
if len (sys.argv) < 3:
|
||||||
sys.exit (__doc__)
|
sys.exit (__doc__)
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
"usage: gen-hb-version.py 1.0.0 hb-version.h.in hb-version.h"
|
"usage: gen-hb-version.py 1.0.0 hb-version.h.in hb-version.h"
|
||||||
|
|
||||||
import io, os, re, sys
|
import os, re, sys
|
||||||
|
|
||||||
if len (sys.argv) < 4:
|
if len (sys.argv) < 4:
|
||||||
sys.exit(__doc__)
|
sys.exit(__doc__)
|
||||||
|
|
|
@ -5,7 +5,6 @@ Input is a tab seperated list of unicode ranges from the otspec
|
||||||
(https://docs.microsoft.com/en-us/typography/opentype/spec/os2#ur).
|
(https://docs.microsoft.com/en-us/typography/opentype/spec/os2#ur).
|
||||||
"""
|
"""
|
||||||
|
|
||||||
import io
|
|
||||||
import re
|
import re
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
|
|
||||||
import io, os, re, sys, subprocess, shutil, tempfile
|
import os, re, sys, subprocess, shutil, tempfile
|
||||||
|
|
||||||
os.chdir(os.path.dirname(__file__))
|
os.chdir (os.path.dirname (__file__))
|
||||||
|
|
||||||
if len (sys.argv) < 2:
|
if len (sys.argv) < 2:
|
||||||
ragel_sources = [x for x in os.listdir ('.') if x.endswith ('.rl')]
|
ragel_sources = [x for x in os.listdir ('.') if x.endswith ('.rl')]
|
||||||
|
@ -37,4 +37,4 @@ for rl in ragel_sources:
|
||||||
if generated != current:
|
if generated != current:
|
||||||
shutil.copyfile (generated_path, hh)
|
shutil.copyfile (generated_path, hh)
|
||||||
|
|
||||||
shutil.rmtree(tempdir)
|
shutil.rmtree (tempdir)
|
||||||
|
|
|
@ -6,7 +6,7 @@ Input file:
|
||||||
* https://unicode.org/Public/UCD/latest/ucdxml/ucd.nounihan.grouped.zip
|
* https://unicode.org/Public/UCD/latest/ucdxml/ucd.nounihan.grouped.zip
|
||||||
"""
|
"""
|
||||||
|
|
||||||
import io, os.path, sys, re
|
import os.path, sys, re
|
||||||
import logging
|
import logging
|
||||||
logging.basicConfig(format='%(levelname)s: %(message)s', level=logging.INFO)
|
logging.basicConfig(format='%(levelname)s: %(message)s', level=logging.INFO)
|
||||||
|
|
||||||
|
|
|
@ -120,7 +120,7 @@ def has_ots ():
|
||||||
def check_ots (path):
|
def check_ots (path):
|
||||||
ots_report, returncode = cmd ([ots_sanitize, path])
|
ots_report, returncode = cmd ([ots_sanitize, path])
|
||||||
if returncode:
|
if returncode:
|
||||||
print("OTS Failure: %s" % ots_report);
|
print ("OTS Failure: %s" % ots_report)
|
||||||
return False
|
return False
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
|
|
@ -17,8 +17,8 @@ class Test:
|
||||||
return ",".join("%X" % ord(c) for (i, c) in enumerate(self.subset))
|
return ",".join("%X" % ord(c) for (i, c) in enumerate(self.subset))
|
||||||
|
|
||||||
def get_profile_flags(self):
|
def get_profile_flags(self):
|
||||||
with open(self.profile_path, mode="r", encoding="utf-8") as f:
|
with open (self.profile_path, mode="r", encoding="utf-8") as f:
|
||||||
return f.read().splitlines();
|
return f.read().splitlines()
|
||||||
|
|
||||||
def get_font_name(self):
|
def get_font_name(self):
|
||||||
font_base_name = os.path.basename(self.font_path)
|
font_base_name = os.path.basename(self.font_path)
|
||||||
|
|
Loading…
Reference in New Issue