From 39fb254e019c920516bb317d4b48a8de7cac850e Mon Sep 17 00:00:00 2001 From: jvoisin Date: Sat, 28 Jan 2023 15:57:20 +0000 Subject: Fix the type annotations --- libmat2/abstract.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'libmat2/abstract.py') diff --git a/libmat2/abstract.py b/libmat2/abstract.py index 426ccfc..1aff630 100644 --- a/libmat2/abstract.py +++ b/libmat2/abstract.py @@ -1,7 +1,7 @@ import abc import os import re -from typing import Union +from typing import Union, Set, Dict class AbstractParser(abc.ABC): @@ -9,8 +9,8 @@ class AbstractParser(abc.ABC): It might yield `ValueError` on instantiation on invalid files, and `RuntimeError` when something went wrong in `remove_all`. """ - meta_list = set() # type: set[str] - mimetypes = set() # type: set[str] + meta_list = set() # type: Set[str] + mimetypes = set() # type: Set[str] def __init__(self, filename: str) -> None: """ @@ -33,7 +33,7 @@ class AbstractParser(abc.ABC): self.sandbox = True @abc.abstractmethod - def get_meta(self) -> dict[str, Union[str, dict]]: + def get_meta(self) -> Dict[str, Union[str, Dict]]: """Return all the metadata of the current file""" @abc.abstractmethod -- cgit v1.3