From b5fee54b4a8ac755f0c6e388cfd182c8992fe7ae Mon Sep 17 00:00:00 2001 From: Yohann D'ANELLO Date: Thu, 8 Oct 2020 21:49:08 +0200 Subject: [PATCH] Move constant arrays in a separate file --- sympasoap/client.py | 74 ++---------------------------------------- sympasoap/constants.py | 70 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 72 insertions(+), 72 deletions(-) create mode 100644 sympasoap/constants.py diff --git a/sympasoap/client.py b/sympasoap/client.py index 781d978..375db78 100644 --- a/sympasoap/client.py +++ b/sympasoap/client.py @@ -1,78 +1,8 @@ from zeep.client import Client as ZeepClient, Settings as ZeepSettings from zeep.exceptions import Fault -from sympasoap.lists import MailingList, MLUser - -TOPICS = [ - "art", - "business", - "computers", - "education", - "entertainment", - "government", - "health", - "news", - "recreation", - "science", - "social", - "society", -] - -SUBTOPICS = [ - "art/finearts", - "art/history", - "art/literature", - "art/photography", - "business/b2b", - "business/finance", - "business/jobs", - "business/shopping", - "computers/games", - "computers/hardware", - "computers/internet", - "computers/software", - "education/college", - "education/k12", - "entertainment/humour", - "entertainment/movies", - "entertainment/music", - "government/elections", - "government/law", - "government/military", - "government/taxes", - "health/diseases", - "health/drugs", - "health/fitness", - "health/medicine", - "news/multimedia", - "news/newspapers", - "news/radio", - "news/tv", - "recreation/autos", - "recreation/outdoors", - "recreation/sports", - "recreation/travel", - "science/animals", - "science/astronomy", - "science/engineering", - "social/archaeology", - "social/economics", - "social/languages", - "society/environment", - "society/people", - "society/religion", -] - -TEMPLATES = [ - "confidential", - "discussion_list", - "hotline", - "html-news-letter", - "intranet_list", - "news-letter", - "private_working_group", - "public_web_forum", -] +from .lists import MailingList, MLUser +from .constants import SUBTOPICS, TOPICS, TEMPLATES class Client: diff --git a/sympasoap/constants.py b/sympasoap/constants.py new file mode 100644 index 0000000..fb412bc --- /dev/null +++ b/sympasoap/constants.py @@ -0,0 +1,70 @@ +TOPICS = [ + "art", + "business", + "computers", + "education", + "entertainment", + "government", + "health", + "news", + "recreation", + "science", + "social", + "society", +] + +SUBTOPICS = [ + "art/finearts", + "art/history", + "art/literature", + "art/photography", + "business/b2b", + "business/finance", + "business/jobs", + "business/shopping", + "computers/games", + "computers/hardware", + "computers/internet", + "computers/software", + "education/college", + "education/k12", + "entertainment/humour", + "entertainment/movies", + "entertainment/music", + "government/elections", + "government/law", + "government/military", + "government/taxes", + "health/diseases", + "health/drugs", + "health/fitness", + "health/medicine", + "news/multimedia", + "news/newspapers", + "news/radio", + "news/tv", + "recreation/autos", + "recreation/outdoors", + "recreation/sports", + "recreation/travel", + "science/animals", + "science/astronomy", + "science/engineering", + "social/archaeology", + "social/economics", + "social/languages", + "society/environment", + "society/people", + "society/religion", +] + +TEMPLATES = [ + "confidential", + "discussion_list", + "hotline", + "html-news-letter", + "intranet_list", + "news-letter", + "private_working_group", + "public_web_forum", +]