From 6a1b0b31f0fbfa59a78a8b9f4f07bf9ed3f91cdf Mon Sep 17 00:00:00 2001 From: jvoisin Date: Mon, 4 Jun 2018 22:54:01 +0200 Subject: Add more typing and use mypy in the CI --- libmat2/harmless.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'libmat2/harmless.py') diff --git a/libmat2/harmless.py b/libmat2/harmless.py index a63407f..d25603b 100644 --- a/libmat2/harmless.py +++ b/libmat2/harmless.py @@ -1,17 +1,18 @@ +from typing import Dict from . import abstract class HarmlessParser(abstract.AbstractParser): """ This is the parser for filetypes that do not contain metadata. """ - mimetypes = {'application/xml', 'text/plain'} + mimetypes = {'application/xml', 'text/plain', 'application/rdf+xml'} def __init__(self, filename: str) -> None: super().__init__(filename) self.filename = filename self.output_filename = filename - def get_meta(self): + def get_meta(self) -> Dict[str, str]: return dict() - def remove_all(self): + def remove_all(self) -> bool: return True -- cgit v1.3