summaryrefslogtreecommitdiff
path: root/service/pixelated/adapter/services/tag_service.py
diff options
context:
space:
mode:
Diffstat (limited to 'service/pixelated/adapter/services/tag_service.py')
-rw-r--r--service/pixelated/adapter/services/tag_service.py12
1 files changed, 4 insertions, 8 deletions
diff --git a/service/pixelated/adapter/services/tag_service.py b/service/pixelated/adapter/services/tag_service.py
index 601392bb..c51da625 100644
--- a/service/pixelated/adapter/services/tag_service.py
+++ b/service/pixelated/adapter/services/tag_service.py
@@ -15,13 +15,9 @@
# along with Pixelated. If not, see <http://www.gnu.org/licenses/>.
from pixelated.adapter.model.tag import Tag
+SPECIAL_TAGS = {Tag('inbox', True), Tag('sent', True), Tag('drafts', True), Tag('trash', True), Tag('ALL', True)}
-class TagService:
- instance = None
- SPECIAL_TAGS = {Tag('inbox', True), Tag('sent', True), Tag('drafts', True), Tag('trash', True), Tag('ALL', True)}
-
- @classmethod
- def extract_reserved(cls, tags):
- tags = map(lambda tag: tag.lower(), tags)
- return {tag.name for tag in cls.SPECIAL_TAGS if tag.name in tags}
+def extract_reserved_tags(tags):
+ tags = [tag.lower() for tag in tags]
+ return {tag.name for tag in SPECIAL_TAGS if tag.name in tags}