2323# to a PDF generating method.
2424
2525from __future__ import unicode_literals
26- from builtins import range
2726
2827import re
2928import os
@@ -83,8 +82,8 @@ def __init__(self, configuration=None, configuration_file=None):
8382 raise Exception (
8483 ('Default configuration file {} not found,' +
8584 ' check the module installation.' ).format (
86- configuration_files [0 ],
87- )
85+ configuration_files [0 ],
86+ )
8887 )
8988
9089 loaded_from_envvar = False
@@ -110,7 +109,7 @@ def __init__(self, configuration=None, configuration_file=None):
110109 configuration_files .append (configuration_file )
111110
112111 configuration_parser = ConfigParser ()
113- configuration_from_files = configuration_parser .read (
112+ configuration_parser .read (
114113 configuration_files
115114 )
116115
@@ -151,7 +150,7 @@ def _ligatures_re(self):
151150
152151 def _get_ligature_forms_from_re_group_index (self , group_index ):
153152 if not hasattr (self , '_re_group_index_to_ligature_forms' ):
154- self ._ligatures_re
153+ return self ._ligatures_re
155154 return self ._re_group_index_to_ligature_forms [group_index ]
156155
157156 def reshape (self , text ):
@@ -176,9 +175,8 @@ def reshape(self, text):
176175
177176 positions_harakat = {}
178177
179- isolated_form = (
180- use_unshaped_instead_of_isolated and UNSHAPED or ISOLATED
181- )
178+ isolated_form = (UNSHAPED
179+ if use_unshaped_instead_of_isolated else ISOLATED )
182180
183181 for letter in text :
184182 if HARAKAT_RE .match (letter ):
@@ -207,7 +205,7 @@ def reshape(self, text):
207205 elif not connects_with_letter_before (letter ):
208206 output .append ((letter , isolated_form ))
209207 elif not connects_with_letter_after (
210- previous_letter [LETTER ]
208+ previous_letter [LETTER ]
211209 ):
212210 output .append ((letter , isolated_form ))
213211 elif (previous_letter [FORM ] == FINAL and not
0 commit comments