Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
synapse
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Monitor
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Maunium
synapse
Commits
d10707c8
Commit
d10707c8
authored
6 years ago
by
Richard van der Hoff
Browse files
Options
Downloads
Patches
Plain Diff
Replace inline docstrings with "Attributes" in class docstring
parent
88d34053
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
synapse/config/server_notices_config.py
+15
-23
15 additions, 23 deletions
synapse/config/server_notices_config.py
with
15 additions
and
23 deletions
synapse/config/server_notices_config.py
+
15
−
23
View file @
d10707c8
...
@@ -37,33 +37,25 @@ DEFAULT_CONFIG = """\
...
@@ -37,33 +37,25 @@ DEFAULT_CONFIG = """\
class
ServerNoticesConfig
(
Config
):
class
ServerNoticesConfig
(
Config
):
def
__init__
(
self
):
"""
Configuration for the server notices room.
super
(
ServerNoticesConfig
,
self
).
__init__
()
"""
The MXID to use for server notices.
Attributes:
server_notices_mxid (str|None):
The MXID to use for server notices.
None if server notices are not enabled.
None if server notices are not enabled.
server_notices_mxid_display_name (str|None):
The display name to use for the server notices user.
None if server notices are not enabled.
type: str|None
server_notices_room_name (str|None):
"""
The name to use for the server notices room.
None if server notices are not enabled.
"""
def
__init__
(
self
):
super
(
ServerNoticesConfig
,
self
).
__init__
()
self
.
server_notices_mxid
=
None
self
.
server_notices_mxid
=
None
"""
The display name to use for the server notices user.
None if server notices are not enabled.
type: str|None
"""
self
.
server_notices_mxid_display_name
=
None
self
.
server_notices_mxid_display_name
=
None
"""
The name to use for the server notices room.
None if server notices are not enabled.
(TODO: i18n)
type: str|None
"""
self
.
server_notices_room_name
=
None
self
.
server_notices_room_name
=
None
def
read_config
(
self
,
config
):
def
read_config
(
self
,
config
):
...
@@ -78,7 +70,7 @@ class ServerNoticesConfig(Config):
...
@@ -78,7 +70,7 @@ class ServerNoticesConfig(Config):
self
.
server_notices_mxid_display_name
=
c
.
get
(
self
.
server_notices_mxid_display_name
=
c
.
get
(
'
system_mxid_display_name
'
,
'
Server Notices
'
,
'
system_mxid_display_name
'
,
'
Server Notices
'
,
)
)
# todo: i18n
self
.
server_notices_room_name
=
c
.
get
(
'
room_name
'
,
"
Server Notices
"
)
self
.
server_notices_room_name
=
c
.
get
(
'
room_name
'
,
"
Server Notices
"
)
def
default_config
(
self
,
**
kwargs
):
def
default_config
(
self
,
**
kwargs
):
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment