Loading diffoscope/main.py +3 −4 Original line number Diff line number Diff line Loading @@ -287,10 +287,9 @@ def run_diffoscope(parsed_args): Config().excludes = parsed_args.excludes presenter_config = configure_presenters(parsed_args) # Don't waste time computing visual differences if we won't use them. Config().compute_visual_diffs = any(( parsed_args.html_output, parsed_args.html_output_directory, )) Config().compute_visual_diffs = any( x['klass'].supports_visual_diffs for x in presenter_config.values(), ) set_path() set_locale() logger.debug('Starting comparison') Loading diffoscope/presenters/html/html.py +3 −1 Original line number Diff line number Diff line Loading @@ -79,6 +79,8 @@ spl_print_func, spl_print_ctrl = None, None class HTMLPresenter(Presenter): supports_visual_diffs = True @classmethod def run(cls, data, difference, parsed_args, has_differences): with make_printer(parsed_args.html_output) as fn: Loading @@ -89,7 +91,7 @@ class HTMLPresenter(Presenter): ) class HTMLDirectoryPresenter(Presenter): class HTMLDirectoryPresenter(HTMLPresenter): @classmethod def run(cls, data, difference, parsed_args, has_differences): output_html_directory( Loading diffoscope/presenters/utils.py +2 −0 Original line number Diff line number Diff line Loading @@ -23,6 +23,8 @@ import contextlib class Presenter(object): supports_visual_diffs = False def __init__(self): self.depth = 0 Loading Loading
diffoscope/main.py +3 −4 Original line number Diff line number Diff line Loading @@ -287,10 +287,9 @@ def run_diffoscope(parsed_args): Config().excludes = parsed_args.excludes presenter_config = configure_presenters(parsed_args) # Don't waste time computing visual differences if we won't use them. Config().compute_visual_diffs = any(( parsed_args.html_output, parsed_args.html_output_directory, )) Config().compute_visual_diffs = any( x['klass'].supports_visual_diffs for x in presenter_config.values(), ) set_path() set_locale() logger.debug('Starting comparison') Loading
diffoscope/presenters/html/html.py +3 −1 Original line number Diff line number Diff line Loading @@ -79,6 +79,8 @@ spl_print_func, spl_print_ctrl = None, None class HTMLPresenter(Presenter): supports_visual_diffs = True @classmethod def run(cls, data, difference, parsed_args, has_differences): with make_printer(parsed_args.html_output) as fn: Loading @@ -89,7 +91,7 @@ class HTMLPresenter(Presenter): ) class HTMLDirectoryPresenter(Presenter): class HTMLDirectoryPresenter(HTMLPresenter): @classmethod def run(cls, data, difference, parsed_args, has_differences): output_html_directory( Loading
diffoscope/presenters/utils.py +2 −0 Original line number Diff line number Diff line Loading @@ -23,6 +23,8 @@ import contextlib class Presenter(object): supports_visual_diffs = False def __init__(self): self.depth = 0 Loading