diff src/common/constants.py @ 1113:cdd389ef97bc

server: code style reformatting using black
author Goffi <goffi@goffi.org>
date Fri, 29 Jun 2018 17:45:26 +0200
parents f2170536ba23
children 1f67b003c312
line wrap: on
line diff
--- a/src/common/constants.py	Sun Jun 24 22:21:25 2018 +0200
+++ b/src/common/constants.py	Fri Jun 29 17:45:26 2018 +0200
@@ -25,33 +25,33 @@
 
     # XXX: we don't want to use the APP_VERSION inherited from sat.core.constants version
     #      as we use this version to check that there is not a mismatch with backend
-    APP_VERSION = u'0.7.0D'  # Please add 'D' at the end for dev versions
+    APP_VERSION = u"0.7.0D"  # Please add 'D' at the end for dev versions
     LIBERVIA_MAIN_PAGE = "libervia.html"
 
     # REGISTRATION
     # XXX: for now libervia forces the creation to lower case
     # XXX: Regex patterns must be compatible with both Python and JS
-    REG_LOGIN_RE = r'^[a-z0-9_-]+$'
-    REG_EMAIL_RE = r'^.+@.+\..+'
+    REG_LOGIN_RE = r"^[a-z0-9_-]+$"
+    REG_EMAIL_RE = r"^.+@.+\..+"
     PASSWORD_MIN_LENGTH = 6
 
     # HTTP REQUEST RESULT VALUES
-    PROFILE_AUTH_ERROR = 'PROFILE AUTH ERROR'
-    XMPP_AUTH_ERROR = 'XMPP AUTH ERROR'
-    ALREADY_WAITING = 'ALREADY WAITING'
-    SESSION_ACTIVE = 'SESSION ACTIVE'
-    NOT_CONNECTED = 'NOT CONNECTED'
-    PROFILE_LOGGED = 'LOGGED'
-    PROFILE_LOGGED_EXT_JID = 'LOGGED (REGISTERED WITH EXTERNAL JID)'
-    ALREADY_EXISTS = 'ALREADY EXISTS'
-    REGISTRATION_SUCCEED = 'REGISTRATION'
-    INTERNAL_ERROR = 'INTERNAL ERROR'
-    INVALID_INPUT = 'INVALID INPUT'
-    BAD_REQUEST = 'BAD REQUEST'
-    NO_REPLY = 'NO REPLY'
-    NOT_ALLOWED = 'NOT ALLOWED'
-    UPLOAD_OK = 'UPLOAD OK'
-    UPLOAD_KO = 'UPLOAD KO'
+    PROFILE_AUTH_ERROR = "PROFILE AUTH ERROR"
+    XMPP_AUTH_ERROR = "XMPP AUTH ERROR"
+    ALREADY_WAITING = "ALREADY WAITING"
+    SESSION_ACTIVE = "SESSION ACTIVE"
+    NOT_CONNECTED = "NOT CONNECTED"
+    PROFILE_LOGGED = "LOGGED"
+    PROFILE_LOGGED_EXT_JID = "LOGGED (REGISTERED WITH EXTERNAL JID)"
+    ALREADY_EXISTS = "ALREADY EXISTS"
+    REGISTRATION_SUCCEED = "REGISTRATION"
+    INTERNAL_ERROR = "INTERNAL ERROR"
+    INVALID_INPUT = "INVALID INPUT"
+    BAD_REQUEST = "BAD REQUEST"
+    NO_REPLY = "NO REPLY"
+    NOT_ALLOWED = "NOT ALLOWED"
+    UPLOAD_OK = "UPLOAD OK"
+    UPLOAD_KO = "UPLOAD KO"
 
     # directories
     MEDIA_DIR = "media/"
@@ -64,4 +64,4 @@
     EMPTY_AVATAR_URL = os.path.join(MEDIA_DIR, "misc", EMPTY_AVATAR_FILE)
 
     # blog
-    MAM_FILTER_CATEGORY = 'http://salut-a-toi.org/protocols/mam_filter_category'
+    MAM_FILTER_CATEGORY = "http://salut-a-toi.org/protocols/mam_filter_category"