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
e79ee483
Unverified
Commit
e79ee483
authored
3 years ago
by
David Robertson
Committed by
GitHub
3 years ago
Browse files
Options
Downloads
Patches
Plain Diff
disallow-untyped-defs for synapse.server_notices (#11021)
parent
7301019d
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
changelog.d/11021.misc
+1
-0
1 addition, 0 deletions
changelog.d/11021.misc
mypy.ini
+3
-0
3 additions, 0 deletions
mypy.ini
synapse/server_notices/server_notices_manager.py
+2
-6
2 additions, 6 deletions
synapse/server_notices/server_notices_manager.py
with
6 additions
and
6 deletions
changelog.d/11021.misc
0 → 100644
+
1
−
0
View file @
e79ee483
Add additional type hints to `synapse.server_notices`.
\ No newline at end of file
This diff is collapsed.
Click to expand it.
mypy.ini
+
3
−
0
View file @
e79ee483
...
...
@@ -99,6 +99,9 @@ disallow_untyped_defs = True
[mypy-synapse.rest.*]
disallow_untyped_defs
=
True
[mypy-synapse.server_notices.*]
disallow_untyped_defs
=
True
[mypy-synapse.state.*]
disallow_untyped_defs
=
True
...
...
This diff is collapsed.
Click to expand it.
synapse/server_notices/server_notices_manager.py
+
2
−
6
View file @
e79ee483
...
...
@@ -41,12 +41,8 @@ class ServerNoticesManager:
self
.
_notifier
=
hs
.
get_notifier
()
self
.
server_notices_mxid
=
self
.
_config
.
servernotices
.
server_notices_mxid
def
is_enabled
(
self
):
"""
Checks if server notices are enabled on this server.
Returns:
bool
"""
def
is_enabled
(
self
)
->
bool
:
"""
Checks if server notices are enabled on this server.
"""
return
self
.
server_notices_mxid
is
not
None
async
def
send_notice
(
...
...
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