mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-11-29 08:25:10 +00:00
*: Utilize newer 3.10 syntax for type hints
Tests: - mypy does not show any errors. - Installing ejabberd app works. Privileged actions run fine. - Unit tests work. - No additional testing was done as type annotations don't have any effect at runtime. Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org> Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
1 parent
a86a86d605
commit
38ece87c6c
29 files changed
+116
-140
No files matched your search
@@ -10,7 +10,6 @@ See: https://rspamd.com/doc/modules/dkim_signing.html
|
||||
"""
|
||||
|
||||
from dataclasses import dataclass
|
||||
from typing import Union
|
||||
|
||||
|
||||
@dataclass
|
||||
@@ -19,12 +18,12 @@ class Entry: # pylint: disable=too-many-instance-attributes
|
||||
|
||||
type_: str
|
||||
value: str
|
||||
domain: Union[str, None] = None
|
||||
domain: str | None = None
|
||||
class_: str = 'IN'
|
||||
ttl: int = 60
|
||||
priority: int = 10
|
||||
weight: Union[int, None] = None
|
||||
port: Union[int, None] = None
|
||||
weight: int | None = None
|
||||
port: int | None = None
|
||||
|
||||
def get_split_value(self):
|
||||
"""If the record is TXT and value > 255, split it."""
|
||||
|
||||
Reference in new issue
Block a user