diff options
| author | jvoisin | 2018-06-04 22:54:01 +0200 |
|---|---|---|
| committer | jvoisin | 2018-06-04 23:20:30 +0200 |
| commit | 6a1b0b31f0fbfa59a78a8b9f4f07bf9ed3f91cdf (patch) | |
| tree | fdb8e31a7ad5bf6982cb8c11a2012205a0cfe14f /libmat2/harmless.py | |
| parent | 4ebf9754f84e28eb73a09df0f788b5be80c9c73e (diff) | |
Add more typing and use mypy in the CI
Diffstat (limited to 'libmat2/harmless.py')
| -rw-r--r-- | libmat2/harmless.py | 7 |
1 files changed, 4 insertions, 3 deletions
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 @@ | |||
| 1 | from typing import Dict | ||
| 1 | from . import abstract | 2 | from . import abstract |
| 2 | 3 | ||
| 3 | 4 | ||
| 4 | class HarmlessParser(abstract.AbstractParser): | 5 | class HarmlessParser(abstract.AbstractParser): |
| 5 | """ This is the parser for filetypes that do not contain metadata. """ | 6 | """ This is the parser for filetypes that do not contain metadata. """ |
| 6 | mimetypes = {'application/xml', 'text/plain'} | 7 | mimetypes = {'application/xml', 'text/plain', 'application/rdf+xml'} |
| 7 | 8 | ||
| 8 | def __init__(self, filename: str) -> None: | 9 | def __init__(self, filename: str) -> None: |
| 9 | super().__init__(filename) | 10 | super().__init__(filename) |
| 10 | self.filename = filename | 11 | self.filename = filename |
| 11 | self.output_filename = filename | 12 | self.output_filename = filename |
| 12 | 13 | ||
| 13 | def get_meta(self): | 14 | def get_meta(self) -> Dict[str, str]: |
| 14 | return dict() | 15 | return dict() |
| 15 | 16 | ||
| 16 | def remove_all(self): | 17 | def remove_all(self) -> bool: |
| 17 | return True | 18 | return True |
