From 9865ae23bfffc287f010a6c0f101f8c9d576357e Mon Sep 17 00:00:00 2001 From: PhilipMay Date: Thu, 21 Dec 2023 18:53:15 +0100 Subject: [PATCH] Update typing in somajo.py --- mltb2/somajo.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mltb2/somajo.py b/mltb2/somajo.py index 5b97c3a..a948eec 100644 --- a/mltb2/somajo.py +++ b/mltb2/somajo.py @@ -12,7 +12,7 @@ from abc import ABC from dataclasses import dataclass, field -from typing import Container, Dict, Iterable, List, Optional, Set, Tuple, Union +from typing import Container, Dict, Iterable, List, Literal, Optional, Set, Tuple, Union from somajo import SoMaJo from tqdm import tqdm @@ -29,7 +29,7 @@ class SoMaJoBaseClass(ABC): This class is an abstract base class. It should not be used directly. """ - language: str + language: Literal["de_CMC", "en_PTB"] somajo: SoMaJo = field(init=False, repr=False) def __post_init__(self):