summaryrefslogtreecommitdiff
path: root/server/szurubooru/func/util.py
diff options
context:
space:
mode:
authorHunternif <hunternif@gmail.com>2025-02-15 18:12:57 +0000
committerHunternif <hunternif@gmail.com>2025-02-15 18:12:57 +0000
commit6a5300502df8b4de9c8f269b444cd309f02b28ad (patch)
tree0cf2ba56bce802c94ad324f9eda7a31d37a42e2e /server/szurubooru/func/util.py
parent34e7c883808738871aed371948a3c9896a95905c (diff)
parent376f687c386f65522b2f65e98b998b21af26ee29 (diff)
Merge branch 'master' into hunternif
Diffstat (limited to 'server/szurubooru/func/util.py')
-rw-r--r--server/szurubooru/func/util.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/server/szurubooru/func/util.py b/server/szurubooru/func/util.py
index eacdc2a..dc5ced0 100644
--- a/server/szurubooru/func/util.py
+++ b/server/szurubooru/func/util.py
@@ -87,12 +87,12 @@ def flip(source: Dict[Any, Any]) -> Dict[Any, Any]:
def is_valid_email(email: Optional[str]) -> bool:
- """ Return whether given email address is valid or empty. """
+ """Return whether given email address is valid or empty."""
return not email or re.match(r"^[^@]*@[^@]*\.[^@]*$", email) is not None
class dotdict(dict):
- """ dot.notation access to dictionary attributes. """
+ """dot.notation access to dictionary attributes."""
def __getattr__(self, attr: str) -> Any:
return self.get(attr)
@@ -102,7 +102,7 @@ class dotdict(dict):
def parse_time_range(value: str) -> Tuple[datetime, datetime]:
- """ Return tuple containing min/max time for given text representation. """
+ """Return tuple containing min/max time for given text representation."""
one_day = timedelta(days=1)
one_second = timedelta(seconds=1)
almost_one_day = one_day - one_second