|
1 | 1 | """Module containing the base comparators.""" |
2 | 2 |
|
3 | 3 | # LICENSE HEADER MANAGED BY add-license-header |
4 | | -# Copyright (c) 2023-2024 Blue Brain Project, EPFL. |
| 4 | +# Copyright (c) 2023-2025 Blue Brain Project, EPFL. |
5 | 5 | # |
6 | 6 | # This file is part of dir-content-diff. |
7 | 7 | # See https://github.com/BlueBrain/dir-content-diff for further info. |
@@ -665,23 +665,16 @@ def __call__(self, ref_file, comp_file, *args, **kwargs): |
665 | 665 |
|
666 | 666 | kwargs["tempdir"] = new_tempdir |
667 | 667 |
|
| 668 | + # Update default verbosity |
| 669 | + current_default_verbosity = diff_pdf_visually.constants.DEFAULT_VERBOSITY |
668 | 670 | try: |
669 | | - # Update default verbosity |
670 | 671 | if "verbosity" not in kwargs: # pragma: no branch |
671 | | - current_default_verbosity = int( |
672 | | - diff_pdf_visually.constants.DEFAULT_VERBOSITY |
673 | | - ) |
674 | | - try: |
675 | | - if ( |
676 | | - diff_pdf_visually.diff.pdfdiff_pages.__defaults__[1] is None |
677 | | - ): # pragma: no cover |
678 | | - diff_pdf_visually.constants.DEFAULT_VERBOSITY = 0 |
679 | | - else: |
680 | | - kwargs["verbosity"] = 0 |
681 | | - finally: |
682 | | - diff_pdf_visually.constants.DEFAULT_VERBOSITY = ( |
683 | | - current_default_verbosity |
684 | | - ) |
| 672 | + if ( |
| 673 | + diff_pdf_visually.diff.pdfdiff_pages.__defaults__[1] is None |
| 674 | + ): # pragma: no cover |
| 675 | + diff_pdf_visually.constants.DEFAULT_VERBOSITY = 0 |
| 676 | + else: |
| 677 | + kwargs["verbosity"] = 0 # pragma: no cover |
685 | 678 | return super().__call__(ref_file, comp_file, *args, **kwargs) |
686 | 679 | finally: |
687 | 680 | diff_pdf_visually.constants.DEFAULT_VERBOSITY = current_default_verbosity |
|
0 commit comments