From 8265639047239ffa4d412194f8030fb459518329 Mon Sep 17 00:00:00 2001 From: Justin Warren Date: Sun, 9 Jul 2023 07:33:26 +1000 Subject: [PATCH] Use __future__.annotations so type hints work with Python < 2.9 --- src/fediblockhole/__init__.py | 2 +- src/fediblockhole/blocklists.py | 1 + src/fediblockhole/const.py | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/fediblockhole/__init__.py b/src/fediblockhole/__init__.py index 8a0823c..67c80ea 100755 --- a/src/fediblockhole/__init__.py +++ b/src/fediblockhole/__init__.py @@ -1,6 +1,6 @@ """A tool for managing federated Mastodon blocklists """ - +from __future__ import annotations import argparse import toml import csv diff --git a/src/fediblockhole/blocklists.py b/src/fediblockhole/blocklists.py index 1edf886..72cb804 100644 --- a/src/fediblockhole/blocklists.py +++ b/src/fediblockhole/blocklists.py @@ -1,5 +1,6 @@ """Parse various blocklist data formats """ +from __future__ import annotations import csv import json from typing import Iterable diff --git a/src/fediblockhole/const.py b/src/fediblockhole/const.py index 93cf2ef..ea35cb1 100644 --- a/src/fediblockhole/const.py +++ b/src/fediblockhole/const.py @@ -1,5 +1,6 @@ """ Constant objects used by FediBlockHole """ +from __future__ import annotations import enum from typing import NamedTuple, Optional, TypedDict from dataclasses import dataclass