tracim.config.CFG.__setattr__()   B
last analyzed

Complexity

Conditions 5

Size

Total Lines 21
Code Lines 7

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 5
eloc 7
nop 3
dl 0
loc 21
rs 8.439
c 0
b 0
f 0
1
# -*- coding: utf-8 -*-
0 ignored issues
show
Coding Style introduced by
This module should have a docstring.

The coding style of this project requires that you add a docstring to this code element. Below, you find an example for methods:

class SomeClass:
    def some_method(self):
        """Do x and return foo."""

If you would like to know more about docstrings, we recommend to read PEP-257: Docstring Conventions.

Loading history...
2
from urllib.parse import urlparse
3
from paste.deploy.converters import asbool
4
from tracim.lib.utils.logger import logger
5
from depot.manager import DepotManager
6
7
8
class CFG(object):
0 ignored issues
show
best-practice introduced by
Too many instance attributes (13/7)
Loading history...
Unused Code introduced by
The variable __class__ seems to be unused.
Loading history...
9
    """Object used for easy access to config file parameters."""
10
11
    def __setattr__(self, key, value):
12
        """
13
        Log-ready setter.
14
15
        Logs all configuration parameters except password.
16
        :param key:
17
        :param value:
18
        :return:
19
        """
20
        if 'PASSWORD' not in key and \
21
                ('URL' not in key or type(value) == str) and \
0 ignored issues
show
introduced by
Using type() instead of isinstance() for a typecheck.
Loading history...
22
                'CONTENT' not in key:
23
            # We do not show PASSWORD for security reason
24
            # we do not show URL because At the time of configuration setup,
25
            # it can't be evaluated
26
            # We do not show CONTENT in order not to pollute log files
27
            logger.info(self, 'CONFIG: [ {} | {} ]'.format(key, value))
28
        else:
29
            logger.info(self, 'CONFIG: [ {} | <value not shown> ]'.format(key))
30
31
        self.__dict__[key] = value
32
33
    def __init__(self, settings):
34
        """Parse configuration file."""
35
36
        ###
37
        # General
38
        ###
39
40
        mandatory_msg = \
41
            'ERROR: {} configuration is mandatory. Set it before continuing.'
42
        self.DEPOT_STORAGE_DIR = settings.get(
0 ignored issues
show
Coding Style Naming introduced by
The name DEPOT_STORAGE_DIR does not conform to the attribute naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
43
            'depot_storage_dir',
44
        )
45
        if not self.DEPOT_STORAGE_DIR:
46
            raise Exception(
47
                mandatory_msg.format('depot_storage_dir')
48
            )
49
        self.DEPOT_STORAGE_NAME = settings.get(
0 ignored issues
show
Coding Style Naming introduced by
The name DEPOT_STORAGE_NAME does not conform to the attribute naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
50
            'depot_storage_name',
51
        )
52
        if not self.DEPOT_STORAGE_NAME:
53
            raise Exception(
54
                mandatory_msg.format('depot_storage_name')
55
            )
56
        self.PREVIEW_CACHE_DIR = settings.get(
0 ignored issues
show
Coding Style Naming introduced by
The name PREVIEW_CACHE_DIR does not conform to the attribute naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
57
            'preview_cache_dir',
58
        )
59
        if not self.PREVIEW_CACHE_DIR:
60
            raise Exception(
61
                'ERROR: preview_cache_dir configuration is mandatory. '
62
                'Set it before continuing.'
63
            )
64
65
        self.DATA_UPDATE_ALLOWED_DURATION = int(settings.get(
0 ignored issues
show
Coding Style Naming introduced by
The name DATA_UPDATE_ALLOWED_DURATION does not conform to the attribute naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
66
            'content.update.allowed.duration',
67
            0,
68
        ))
69
70
        self.WEBSITE_TITLE = settings.get(
0 ignored issues
show
Coding Style Naming introduced by
The name WEBSITE_TITLE does not conform to the attribute naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
71
            'website.title',
72
            'TRACIM',
73
        )
74
75
        self.WEBSITE_BASE_URL = settings.get(
0 ignored issues
show
Coding Style Naming introduced by
The name WEBSITE_BASE_URL does not conform to the attribute naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
76
            'website.base_url',
77
            '',
78
        )
79
80
        # TODO - G.M - 26-03-2018 - [Cleanup] These params seems deprecated for tracimv2,  # nopep8
0 ignored issues
show
Coding Style introduced by
TODO and FIXME comments should generally be avoided.
Loading history...
81
        # Verify this
82
        #
83
        # self.WEBSITE_HOME_TITLE_COLOR = settings.get(
84
        #     'website.title.color',
85
        #     '#555',
86
        # )
87
        # self.WEBSITE_HOME_IMAGE_PATH = settings.get(
88
        #     '/assets/img/home_illustration.jpg',
89
        # )
90
        # self.WEBSITE_HOME_BACKGROUND_IMAGE_PATH = settings.get(
91
        #     '/assets/img/bg.jpg',
92
        # )
93
        #
94
95
        self.WEBSITE_SERVER_NAME = settings.get(
0 ignored issues
show
Coding Style Naming introduced by
The name WEBSITE_SERVER_NAME does not conform to the attribute naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
96
            'website.server_name',
97
            None,
98
        )
99
100
        if not self.WEBSITE_SERVER_NAME:
101
            self.WEBSITE_SERVER_NAME = urlparse(self.WEBSITE_BASE_URL).hostname
102
            logger.warning(
103
                self,
104
                'NOTE: Generated website.server_name parameter from '
105
                'website.base_url parameter -> {0}'
106
                .format(self.WEBSITE_SERVER_NAME)
107
            )
108
109
        self.WEBSITE_HOME_TAG_LINE = settings.get(
0 ignored issues
show
Coding Style Naming introduced by
The name WEBSITE_HOME_TAG_LINE does not conform to the attribute naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
110
            'website.home.tag_line',
111
            '',
112
        )
113
        self.WEBSITE_SUBTITLE = settings.get(
0 ignored issues
show
Coding Style Naming introduced by
The name WEBSITE_SUBTITLE does not conform to the attribute naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
114
            'website.home.subtitle',
115
            '',
116
        )
117
        self.WEBSITE_HOME_BELOW_LOGIN_FORM = settings.get(
0 ignored issues
show
Coding Style Naming introduced by
The name WEBSITE_HOME_BELOW_LOGIN_FORM does not conform to the attribute naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
118
            'website.home.below_login_form',
119
            '',
120
        )
121
122
        self.WEBSITE_TREEVIEW_CONTENT = settings.get(
0 ignored issues
show
Coding Style Naming introduced by
The name WEBSITE_TREEVIEW_CONTENT does not conform to the attribute naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
123
            'website.treeview.content',
124
        )
125
126
        self.USER_AUTH_TOKEN_VALIDITY = int(settings.get(
0 ignored issues
show
Coding Style Naming introduced by
The name USER_AUTH_TOKEN_VALIDITY does not conform to the attribute naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
127
            'user.auth_token.validity',
128
            '604800',
129
        ))
130
131
        # TODO - G.M - 27-03-2018 - [Email] Restore email config
0 ignored issues
show
Coding Style introduced by
TODO and FIXME comments should generally be avoided.
Loading history...
132
        ###
133
        # EMAIL related stuff (notification, reply)
134
        ###
135
        #
136
        # self.EMAIL_NOTIFICATION_NOTIFIED_EVENTS = [
137
        #     # ActionDescription.COMMENT,
138
        #     # ActionDescription.CREATION,
139
        #     # ActionDescription.EDITION,
140
        #     # ActionDescription.REVISION,
141
        #     # ActionDescription.STATUS_UPDATE
142
        # ]
143
        #
144
        # self.EMAIL_NOTIFICATION_NOTIFIED_CONTENTS = [
145
        #     # ContentType.Page,
146
        #     # ContentType.Thread,
147
        #     # ContentType.File,
148
        #     # ContentType.Comment,
149
        #     # ContentType.Folder -- Folder is skipped
150
        # ]
151
        # if settings.get('email.notification.from'):
152
        #     raise Exception(
153
        #         'email.notification.from configuration is deprecated. '
154
        #         'Use instead email.notification.from.email and '
155
        #         'email.notification.from.default_label.'
156
        #     )
157
        #
158
        # self.EMAIL_NOTIFICATION_FROM_EMAIL = settings.get(
159
        #     'email.notification.from.email',
160
        # )
161
        # self.EMAIL_NOTIFICATION_FROM_DEFAULT_LABEL = settings.get(
162
        #     'email.notification.from.default_label'
163
        # )
164
        # self.EMAIL_NOTIFICATION_REPLY_TO_EMAIL = settings.get(
165
        #     'email.notification.reply_to.email',
166
        # )
167
        # self.EMAIL_NOTIFICATION_REFERENCES_EMAIL = settings.get(
168
        #     'email.notification.references.email'
169
        # )
170
        # self.EMAIL_NOTIFICATION_CONTENT_UPDATE_TEMPLATE_HTML = settings.get(
171
        #     'email.notification.content_update.template.html',
172
        # )
173
        # self.EMAIL_NOTIFICATION_CONTENT_UPDATE_TEMPLATE_TEXT = settings.get(
174
        #     'email.notification.content_update.template.text',
175
        # )
176
        # self.EMAIL_NOTIFICATION_CREATED_ACCOUNT_TEMPLATE_HTML = settings.get(
177
        #     'email.notification.created_account.template.html',
178
        #     './tracim/templates/mail/created_account_body_html.mak',
179
        # )
180
        # self.EMAIL_NOTIFICATION_CREATED_ACCOUNT_TEMPLATE_TEXT = settings.get(
181
        #     'email.notification.created_account.template.text',
182
        #     './tracim/templates/mail/created_account_body_text.mak',
183
        # )
184
        # self.EMAIL_NOTIFICATION_CONTENT_UPDATE_SUBJECT = settings.get(
185
        #     'email.notification.content_update.subject',
186
        # )
187
        # self.EMAIL_NOTIFICATION_CREATED_ACCOUNT_SUBJECT = settings.get(
188
        #     'email.notification.created_account.subject',
189
        #     '[{website_title}] Created account',
190
        # )
191
        # self.EMAIL_NOTIFICATION_PROCESSING_MODE = settings.get(
192
        #     'email.notification.processing_mode',
193
        # )
194
        #
195
        self.EMAIL_NOTIFICATION_ACTIVATED = asbool(settings.get(
0 ignored issues
show
Coding Style Naming introduced by
The name EMAIL_NOTIFICATION_ACTIVATED does not conform to the attribute naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
196
            'email.notification.activated',
197
        ))
198
        # self.EMAIL_NOTIFICATION_SMTP_SERVER = settings.get(
199
        #     'email.notification.smtp.server',
200
        # )
201
        # self.EMAIL_NOTIFICATION_SMTP_PORT = settings.get(
202
        #     'email.notification.smtp.port',
203
        # )
204
        # self.EMAIL_NOTIFICATION_SMTP_USER = settings.get(
205
        #     'email.notification.smtp.user',
206
        # )
207
        # self.EMAIL_NOTIFICATION_SMTP_PASSWORD = settings.get(
208
        #     'email.notification.smtp.password',
209
        # )
210
        # self.EMAIL_NOTIFICATION_LOG_FILE_PATH = settings.get(
211
        #     'email.notification.log_file_path',
212
        #     None,
213
        # )
214
        #
215
        # self.EMAIL_REPLY_ACTIVATED = asbool(settings.get(
216
        #     'email.reply.activated',
217
        #     False,
218
        # ))
219
        #
220
        # self.EMAIL_REPLY_IMAP_SERVER = settings.get(
221
        #     'email.reply.imap.server',
222
        # )
223
        # self.EMAIL_REPLY_IMAP_PORT = settings.get(
224
        #     'email.reply.imap.port',
225
        # )
226
        # self.EMAIL_REPLY_IMAP_USER = settings.get(
227
        #     'email.reply.imap.user',
228
        # )
229
        # self.EMAIL_REPLY_IMAP_PASSWORD = settings.get(
230
        #     'email.reply.imap.password',
231
        # )
232
        # self.EMAIL_REPLY_IMAP_FOLDER = settings.get(
233
        #     'email.reply.imap.folder',
234
        # )
235
        # self.EMAIL_REPLY_CHECK_HEARTBEAT = int(settings.get(
236
        #     'email.reply.check.heartbeat',
237
        #     60,
238
        # ))
239
        # self.EMAIL_REPLY_TOKEN = settings.get(
240
        #     'email.reply.token',
241
        # )
242
        # self.EMAIL_REPLY_IMAP_USE_SSL = asbool(settings.get(
243
        #     'email.reply.imap.use_ssl',
244
        # ))
245
        # self.EMAIL_REPLY_IMAP_USE_IDLE = asbool(settings.get(
246
        #     'email.reply.imap.use_idle',
247
        #     True,
248
        # ))
249
        # self.EMAIL_REPLY_CONNECTION_MAX_LIFETIME = int(settings.get(
250
        #     'email.reply.connection.max_lifetime',
251
        #     600,  # 10 minutes
252
        # ))
253
        # self.EMAIL_REPLY_USE_HTML_PARSING = asbool(settings.get(
254
        #     'email.reply.use_html_parsing',
255
        #     True,
256
        # ))
257
        # self.EMAIL_REPLY_USE_TXT_PARSING = asbool(settings.get(
258
        #     'email.reply.use_txt_parsing',
259
        #     True,
260
        # ))
261
        # self.EMAIL_REPLY_LOCKFILE_PATH = settings.get(
262
        #     'email.reply.lockfile_path',
263
        #     ''
264
        # )
265
        # if not self.EMAIL_REPLY_LOCKFILE_PATH and self.EMAIL_REPLY_ACTIVATED:
266
        #     raise Exception(
267
        #         mandatory_msg.format('email.reply.lockfile_path')
268
        #     )
269
        #
270
        # self.EMAIL_PROCESSING_MODE = settings.get(
271
        #     'email.processing_mode',
272
        #     'sync',
273
        # ).upper()
274
        #
275
        # if self.EMAIL_PROCESSING_MODE not in (
276
        #         self.CST.ASYNC,
277
        #         self.CST.SYNC,
278
        # ):
279
        #     raise Exception(
280
        #         'email.processing_mode '
281
        #         'can ''be "{}" or "{}", not "{}"'.format(
282
        #             self.CST.ASYNC,
283
        #             self.CST.SYNC,
284
        #             self.EMAIL_PROCESSING_MODE,
285
        #         )
286
        #     )
287
        #
288
        # self.EMAIL_SENDER_REDIS_HOST = settings.get(
289
        #     'email.async.redis.host',
290
        #     'localhost',
291
        # )
292
        # self.EMAIL_SENDER_REDIS_PORT = int(settings.get(
293
        #     'email.async.redis.port',
294
        #     6379,
295
        # ))
296
        # self.EMAIL_SENDER_REDIS_DB = int(settings.get(
297
        #     'email.async.redis.db',
298
        #     0,
299
        # ))
300
301
        ###
302
        # WSGIDAV (Webdav server)
303
        ###
304
305
        # TODO - G.M - 27-03-2018 - [WebDav] Restore wsgidav config
0 ignored issues
show
Coding Style introduced by
TODO and FIXME comments should generally be avoided.
Loading history...
306
        #self.WSGIDAV_CONFIG_PATH = settings.get(
307
        #    'wsgidav.config_path',
308
        #    'wsgidav.conf',
309
        #)
310
        # TODO: Convert to importlib
0 ignored issues
show
Coding Style introduced by
TODO and FIXME comments should generally be avoided.
Loading history...
311
        # http://stackoverflow.com/questions/41063938/use-importlib-instead-imp-for-non-py-file
312
        #self.wsgidav_config = imp.load_source(
313
        #    'wsgidav_config',
314
        #    self.WSGIDAV_CONFIG_PATH,
315
        #)
316
        # self.WSGIDAV_PORT = self.wsgidav_config.port
317
        # self.WSGIDAV_CLIENT_BASE_URL = settings.get(
318
        #     'wsgidav.client.base_url',
319
        #     None,
320
        # )
321
        #
322
        # if not self.WSGIDAV_CLIENT_BASE_URL:
323
        #     self.WSGIDAV_CLIENT_BASE_URL = \
324
        #         '{0}:{1}'.format(
325
        #             self.WEBSITE_SERVER_NAME,
326
        #             self.WSGIDAV_PORT,
327
        #         )
328
        #     logger.warning(self,
329
        #         'NOTE: Generated wsgidav.client.base_url parameter with '
330
        #         'followings parameters: website.server_name and '
331
        #         'wsgidav.conf port'.format(
332
        #             self.WSGIDAV_CLIENT_BASE_URL,
333
        #         )
334
        #     )
335
        #
336
        # if not self.WSGIDAV_CLIENT_BASE_URL.endswith('/'):
337
        #     self.WSGIDAV_CLIENT_BASE_URL += '/'
338
339
        # TODO - G.M - 27-03-2018 - [Caldav] Restore radicale config
0 ignored issues
show
Coding Style introduced by
TODO and FIXME comments should generally be avoided.
Loading history...
340
        ###
341
        # RADICALE (Caldav server)
342
        ###
343
        # self.RADICALE_SERVER_HOST = settings.get(
344
        #     'radicale.server.host',
345
        #     '127.0.0.1',
346
        # )
347
        # self.RADICALE_SERVER_PORT = int(settings.get(
348
        #     'radicale.server.port',
349
        #     5232,
350
        # ))
351
        # # Note: Other parameters needed to work in SSL (cert file, etc)
352
        # self.RADICALE_SERVER_SSL = asbool(settings.get(
353
        #     'radicale.server.ssl',
354
        #     False,
355
        # ))
356
        # self.RADICALE_SERVER_FILE_SYSTEM_FOLDER = settings.get(
357
        #     'radicale.server.filesystem.folder',
358
        # )
359
        # if not self.RADICALE_SERVER_FILE_SYSTEM_FOLDER:
360
        #     raise Exception(
361
        #         mandatory_msg.format('radicale.server.filesystem.folder')
362
        #     )
363
        # self.RADICALE_SERVER_ALLOW_ORIGIN = settings.get(
364
        #     'radicale.server.allow_origin',
365
        #     None,
366
        # )
367
        # if not self.RADICALE_SERVER_ALLOW_ORIGIN:
368
        #     self.RADICALE_SERVER_ALLOW_ORIGIN = self.WEBSITE_BASE_URL
369
        #     logger.warning(self,
370
        #         'NOTE: Generated radicale.server.allow_origin parameter with '
371
        #         'followings parameters: website.base_url ({0})'
372
        #         .format(self.WEBSITE_BASE_URL)
373
        #     )
374
        #
375
        # self.RADICALE_SERVER_REALM_MESSAGE = settings.get(
376
        #     'radicale.server.realm_message',
377
        #     'Tracim Calendar - Password Required',
378
        # )
379
        #
380
        # self.RADICALE_CLIENT_BASE_URL_HOST = settings.get(
381
        #     'radicale.client.base_url.host',
382
        #     'http://{}:{}'.format(
383
        #         self.RADICALE_SERVER_HOST,
384
        #         self.RADICALE_SERVER_PORT,
385
        #     ),
386
        # )
387
        #
388
        # self.RADICALE_CLIENT_BASE_URL_PREFIX = settings.get(
389
        #     'radicale.client.base_url.prefix',
390
        #     '/',
391
        # )
392
        # # Ensure finished by '/'
393
        # if '/' != self.RADICALE_CLIENT_BASE_URL_PREFIX[-1]:
394
        #     self.RADICALE_CLIENT_BASE_URL_PREFIX += '/'
395
        # if '/' != self.RADICALE_CLIENT_BASE_URL_PREFIX[0]:
396
        #     self.RADICALE_CLIENT_BASE_URL_PREFIX \
397
        #         = '/' + self.RADICALE_CLIENT_BASE_URL_PREFIX
398
        #
399
        # if not self.RADICALE_CLIENT_BASE_URL_HOST:
400
        #     logger.warning(self,
401
        #         'Generated radicale.client.base_url.host parameter with '
402
        #         'followings parameters: website.server_name -> {}'
403
        #         .format(self.WEBSITE_SERVER_NAME)
404
        #     )
405
        #     self.RADICALE_CLIENT_BASE_URL_HOST = self.WEBSITE_SERVER_NAME
406
        #
407
        # self.RADICALE_CLIENT_BASE_URL_TEMPLATE = '{}{}'.format(
408
        #     self.RADICALE_CLIENT_BASE_URL_HOST,
409
        #     self.RADICALE_CLIENT_BASE_URL_PREFIX,
410
        # )
411
412
    def configure_filedepot(self):
0 ignored issues
show
Coding Style introduced by
This method should have a docstring.

The coding style of this project requires that you add a docstring to this code element. Below, you find an example for methods:

class SomeClass:
    def some_method(self):
        """Do x and return foo."""

If you would like to know more about docstrings, we recommend to read PEP-257: Docstring Conventions.

Loading history...
413
        depot_storage_name = self.DEPOT_STORAGE_NAME
414
        depot_storage_path = self.DEPOT_STORAGE_DIR
415
        depot_storage_settings = {'depot.storage_path': depot_storage_path}
416
        DepotManager.configure(
417
            depot_storage_name,
418
            depot_storage_settings,
419
        )
420
421
    class CST(object):
0 ignored issues
show
Coding Style introduced by
This class should have a docstring.

The coding style of this project requires that you add a docstring to this code element. Below, you find an example for methods:

class SomeClass:
    def some_method(self):
        """Do x and return foo."""

If you would like to know more about docstrings, we recommend to read PEP-257: Docstring Conventions.

Loading history...
422
        ASYNC = 'ASYNC'
423
        SYNC = 'SYNC'
424
425
        TREEVIEW_FOLDERS = 'folders'
426
        TREEVIEW_ALL = 'all'
427