You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ponymail.apache.org by se...@apache.org on 2021/12/14 16:27:16 UTC
[incubator-ponymail-foal] branch master updated (436d03c -> 0125710)
This is an automated email from the ASF dual-hosted git repository.
sebb pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-ponymail-foal.git.
from 436d03c tweak label sizes
new 1600108 Add type hints
new 0125710 Update version
The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
server/plugins/messages.py | 28 ++++++++++++++--------------
server/server_version.py | 2 +-
2 files changed, 15 insertions(+), 15 deletions(-)
[incubator-ponymail-foal] 02/02: Update version
Posted by se...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
sebb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-ponymail-foal.git
commit 01257103bc6802d99d0b46a202906d0dfe7b6321
Author: Sebb <se...@apache.org>
AuthorDate: Tue Dec 14 16:26:21 2021 +0000
Update version
---
server/server_version.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/server/server_version.py b/server/server_version.py
index f39d935..b3eb82f 100644
--- a/server/server_version.py
+++ b/server/server_version.py
@@ -1,2 +1,2 @@
# This file is generated by server/update_version.sh
-PONYMAIL_SERVER_VERSION = '81c2aaf'
+PONYMAIL_SERVER_VERSION = 'db8b5b2'
[incubator-ponymail-foal] 01/02: Add type hints
Posted by se...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
sebb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-ponymail-foal.git
commit 1600108551f805c3d977e8be820272b567c86b31
Author: Sebb <se...@apache.org>
AuthorDate: Tue Dec 14 16:26:06 2021 +0000
Add type hints
---
server/plugins/messages.py | 28 ++++++++++++++--------------
1 file changed, 14 insertions(+), 14 deletions(-)
diff --git a/server/plugins/messages.py b/server/plugins/messages.py
index 6d96671..cbf93c3 100644
--- a/server/plugins/messages.py
+++ b/server/plugins/messages.py
@@ -337,11 +337,11 @@ async def get_source(session: plugins.session.SessionObject, permalink: str = No
async def query_batch(
session: plugins.session.SessionObject,
- query_defuzzed,
- hide_deleted=True,
- metadata_only=False,
- epoch_order="desc",
- source_fields=None
+ query_defuzzed: dict,
+ hide_deleted: bool = True,
+ metadata_only: bool = False,
+ epoch_order: str = "desc",
+ source_fields: typing.Optional[typing.List[str]] = None
):
"""
Advanced query and grab for stats.py
@@ -406,10 +406,10 @@ async def query(
session: plugins.session.SessionObject,
query_defuzzed,
query_limit=10000,
- hide_deleted=True,
- metadata_only=False,
- epoch_order="desc",
- source_fields=None
+ hide_deleted: bool = True,
+ metadata_only: bool = False,
+ epoch_order: str = "desc",
+ source_fields: typing.Optional[typing.List[str]] = None
):
"""
Advanced query and grab for stats.py
@@ -573,12 +573,12 @@ class ThreadConstructor:
return self.threads, self.authors
- def find_root_subject(self, root_email, osubject=None):
+ def find_root_subject(self, root_email: typing.Dict[str, str], osubject: str = None) -> typing.Optional[dict]:
"""Finds the discussion origin of an email, if present"""
- irt = root_email.get("in-reply-to")
- subject = root_email.get("subject")
+ irt = root_email.get("in-reply-to",'')
+ subject = root_email.get("subject",'')
subject = subject.replace("\n", "").strip() # Crop multi-line subjects and surrounding whitespace
- subject = PYPONY_RE_PREFIX.sub("", subject) + "_" + root_email.get("list_raw")
+ subject = PYPONY_RE_PREFIX.sub("", subject) + "_" + root_email.get("list_raw",'')
# First, the obvious - look for an in-reply-to in our existing dict with a matching subject
if irt and irt in self.hashed_by_msg_id:
@@ -596,7 +596,7 @@ class ThreadConstructor:
-def gravatar(eml):
+def gravatar(eml: typing.Union[str, dict]) -> str:
"""Generates a gravatar hash from an email address"""
if isinstance(eml, str):
header_from = eml