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 ..."
import io, os, re, sys
import os, re, sys
if len (sys.argv) < 3:
sys.exit (__doc__)

View File

@ -2,7 +2,7 @@
"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:
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).
"""
import io
import re
import sys

View File

@ -1,8 +1,8 @@
#!/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:
ragel_sources = [x for x in os.listdir ('.') if x.endswith ('.rl')]
@ -37,4 +37,4 @@ for rl in ragel_sources:
if generated != current:
shutil.copyfile (generated_path, hh)
shutil.rmtree(tempdir)
shutil.rmtree (tempdir)

View File

@ -6,7 +6,7 @@ Input file:
* https://unicode.org/Public/UCD/latest/ucdxml/ucd.nounihan.grouped.zip
"""
import io, os.path, sys, re
import os.path, sys, re
import logging
logging.basicConfig(format='%(levelname)s: %(message)s', level=logging.INFO)

View File

@ -120,7 +120,7 @@ def has_ots ():
def check_ots (path):
ots_report, returncode = cmd ([ots_sanitize, path])
if returncode:
print("OTS Failure: %s" % ots_report);
print ("OTS Failure: %s" % ots_report)
return False
return True

View File

@ -17,8 +17,8 @@ class Test:
return ",".join("%X" % ord(c) for (i, c) in enumerate(self.subset))
def get_profile_flags(self):
with open(self.profile_path, mode="r", encoding="utf-8") as f:
return f.read().splitlines();
with open (self.profile_path, mode="r", encoding="utf-8") as f:
return f.read().splitlines()
def get_font_name(self):
font_base_name = os.path.basename(self.font_path)