Use Python 3.9-style type hinting for tuple[] and AbstractSet -> Set

This commit is contained in:
James R. Barlow
2023-10-01 00:09:05 -07:00
parent 113a6b45bd
commit f4c211fa2d
3 changed files with 10 additions and 10 deletions
+3 -3
View File
@@ -7,10 +7,10 @@ from __future__ import annotations
from abc import ABC, abstractmethod
from argparse import ArgumentParser, Namespace
from collections.abc import Sequence
from collections.abc import Sequence, Set
from logging import Handler
from pathlib import Path
from typing import TYPE_CHECKING, AbstractSet, NamedTuple
from typing import TYPE_CHECKING, NamedTuple
import pluggy
@@ -406,7 +406,7 @@ class OcrEngine(ABC):
@staticmethod
@abstractmethod
def languages(options: Namespace) -> AbstractSet[str]:
def languages(options: Namespace) -> Set[str]:
"""Returns the set of all languages that are supported by the engine.
Languages are typically given in 3-letter ISO 3166-1 codes, but actually