diff --git a/webchanges/storage.py b/webchanges/storage.py index d7be274..1b16b9a 100644 --- a/webchanges/storage.py +++ b/webchanges/storage.py @@ -20,7 +20,6 @@ from dataclasses import dataclass from datetime import datetime from pathlib import Path -from types import NoneType from typing import Any, Dict, Iterable, Iterator, List, Literal, NamedTuple, Optional, TextIO, Tuple, TypedDict, Union import msgpack @@ -33,6 +32,11 @@ from webchanges.reporters import ReporterBase from webchanges.util import edit_file, file_ownership_checks +try: + from types import NoneType +except ImportError: # Python 3.9 + NoneType = type(None) # type: ignore[misc,assignment] + try: import redis except ImportError as e: