aboutsummaryrefslogtreecommitdiff
path: root/mu4web/maildir.py
diff options
context:
space:
mode:
authorHugo Hörnquist <hugo@lysator.liu.se>2023-07-25 21:42:27 +0200
committerHugo Hörnquist <hugo@lysator.liu.se>2023-07-25 22:05:20 +0200
commit210ee835662877c4e5a94450d0656680875e0e18 (patch)
tree79823306a0aea842541a8b2586fcf47b0ced0eb5 /mu4web/maildir.py
parentConfigure linters. (diff)
downloadmu4web-210ee835662877c4e5a94450d0656680875e0e18.tar.gz
mu4web-210ee835662877c4e5a94450d0656680875e0e18.tar.xz
Fix and harden linter checks.
Harden the requirements of mypy, and also check against flake8 docstrings. And fix all errors and warnings resulting from that.
Diffstat (limited to 'mu4web/maildir.py')
-rw-r--r--mu4web/maildir.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/mu4web/maildir.py b/mu4web/maildir.py
index dd5be1c..cbac7c4 100644
--- a/mu4web/maildir.py
+++ b/mu4web/maildir.py
@@ -1,3 +1,10 @@
+"""
+Functions for finding and querying maildirs.
+
+A maildir here is a directory containing a cur, new, and tmp
+directory.
+"""
+
from dataclasses import dataclass
import os.path
@@ -21,12 +28,14 @@ except ModuleNotFoundError:
@dataclass
class MaildirEntry:
"""A single maildir, used by find_maildirs."""
+
name: str
@dataclass
class MaildirGroup:
"""A group of maildir, which isn't a maildir in itself."""
+
name: str
children: list[Union[MaildirEntry, 'MaildirGroup']]