Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Commit

Permalink
Mark Module API error imports as re-exported and mark Synapse as cont…
Browse files Browse the repository at this point in the history
…aining type annotations (#11054)
  • Loading branch information
reivilibre authored Oct 13, 2021
1 parent 8711e15 commit 2a2b189
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 2 deletions.
1 change: 1 addition & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ include demo/demo.tls.dh
include demo/*.py
include demo/*.sh

include synapse/py.typed
recursive-include synapse/storage *.sql
recursive-include synapse/storage *.sql.postgres
recursive-include synapse/storage *.sql.sqlite
Expand Down
1 change: 1 addition & 0 deletions changelog.d/11054.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Mark the Synapse package as containing type annotations and fix export declarations so that Synapse pluggable modules may be type checked against Synapse.
11 changes: 9 additions & 2 deletions synapse/module_api/errors.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,16 @@

"""Exception types which are exposed as part of the stable module API"""

from synapse.api.errors import ( # noqa: F401
from synapse.api.errors import (
InvalidClientCredentialsError,
RedirectException,
SynapseError,
)
from synapse.config._base import ConfigError # noqa: F401
from synapse.config._base import ConfigError

__all__ = [
"InvalidClientCredentialsError",
"RedirectException",
"SynapseError",
"ConfigError",
]
Empty file added synapse/py.typed
Empty file.

0 comments on commit 2a2b189

Please sign in to comment.