minor on python scripts

* remove not needed imports
* remove semicolons
This commit is contained in:
Ebrahim Byagowi 2020-05-29 00:42:32 +04:30
parent ad87155fd0
commit 368ca30641
7 changed files with 9 additions and 10 deletions

View File

@ -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__)

View File

@ -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__)

View File

@ -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

View File

@ -1,6 +1,6 @@
#!/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__))

View File

@ -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)

View File

@ -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

View File

@ -18,7 +18,7 @@ class Test:
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)