Refactor js2c.py and eliminate related pylint warnings (#1728)
JerryScript-DCO-1.0-Signed-off-by: Robert Sipka rsipka.uszeged@partner.samsung.com
This commit is contained in:
@@ -27,8 +27,6 @@
|
||||
# separators: Zs
|
||||
|
||||
from __future__ import print_function
|
||||
from settings import PROJECT_DIR
|
||||
from unicode_c_source import Source
|
||||
|
||||
import argparse
|
||||
import bisect
|
||||
@@ -37,6 +35,9 @@ import itertools
|
||||
import os
|
||||
import sys
|
||||
|
||||
from c_source_helper import UniCodeSource
|
||||
from settings import PROJECT_DIR
|
||||
|
||||
RANGES_C_SOURCE = os.path.join(PROJECT_DIR, 'jerry-core/lit/lit-unicode-ranges.inc.h')
|
||||
|
||||
def main():
|
||||
@@ -65,7 +66,7 @@ def main():
|
||||
non_letter_tables = split_list(list(ranges(non_letters)))
|
||||
separator_tables = split_list(list(ranges(separators)))
|
||||
|
||||
c_source = Source(script_args.c_source)
|
||||
c_source = UniCodeSource(script_args.c_source)
|
||||
|
||||
header_completion = ["/* This file is automatically generated by the %s script" % os.path.basename(__file__),
|
||||
" * from %s. Do not edit! */" % os.path.basename(script_args.unicode_data),
|
||||
@@ -181,9 +182,7 @@ def read_categories(unicode_data_file):
|
||||
separators = []
|
||||
|
||||
with open(unicode_data_file) as unicode_data:
|
||||
unicode_data_reader = csv.reader(unicode_data, delimiter=';')
|
||||
|
||||
for line in unicode_data_reader:
|
||||
for line in csv.reader(unicode_data, delimiter=';'):
|
||||
unicode_id = int(line[0], 16)
|
||||
|
||||
# Skip supplementary planes and ascii chars
|
||||
|
||||
Reference in New Issue
Block a user