From 84eb6318f5ce9b12858ffb414e9e5105504437ab Mon Sep 17 00:00:00 2001 From: Cory Francis Myers Date: Wed, 27 Sep 2023 19:08:33 -0700 Subject: [PATCH] fix(CatalogVerifier): relax typing < Python 3.9 From freedomofpress/securedrop@f5b02f794d3b1ee3b015712f430b98cbfefee686. --- scripts/verify-mo.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/scripts/verify-mo.py b/scripts/verify-mo.py index 945d2b7c8..cc1d7d595 100755 --- a/scripts/verify-mo.py +++ b/scripts/verify-mo.py @@ -20,10 +20,8 @@ import os import shlex import subprocess -from collections.abc import Iterator from pathlib import Path -from types import TracebackType -from typing import Optional, Set +from typing import Any, Iterator, Optional, Set import polib from translate.tools.pocompile import convertmo @@ -61,9 +59,9 @@ def __enter__(self) -> "CatalogVerifier": def __exit__( self, - exc_type: Optional[type[BaseException]], - exc_value: Optional[BaseException], - traceback: Optional[TracebackType], + exc_type: Optional[Any], + exc_value: Optional[Any], + traceback: Optional[Any], ) -> None: """Clean up."""