Mark Module API error imports as re-exported and mark Synapse as containing type annotations (#11054)
This commit is contained in:
parent
8711e15734
commit
2a2b189130
|
@ -8,6 +8,7 @@ include demo/demo.tls.dh
|
||||||
include demo/*.py
|
include demo/*.py
|
||||||
include demo/*.sh
|
include demo/*.sh
|
||||||
|
|
||||||
|
include synapse/py.typed
|
||||||
recursive-include synapse/storage *.sql
|
recursive-include synapse/storage *.sql
|
||||||
recursive-include synapse/storage *.sql.postgres
|
recursive-include synapse/storage *.sql.postgres
|
||||||
recursive-include synapse/storage *.sql.sqlite
|
recursive-include synapse/storage *.sql.sqlite
|
||||||
|
|
|
@ -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.
|
|
@ -14,9 +14,16 @@
|
||||||
|
|
||||||
"""Exception types which are exposed as part of the stable module API"""
|
"""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,
|
InvalidClientCredentialsError,
|
||||||
RedirectException,
|
RedirectException,
|
||||||
SynapseError,
|
SynapseError,
|
||||||
)
|
)
|
||||||
from synapse.config._base import ConfigError # noqa: F401
|
from synapse.config._base import ConfigError
|
||||||
|
|
||||||
|
__all__ = [
|
||||||
|
"InvalidClientCredentialsError",
|
||||||
|
"RedirectException",
|
||||||
|
"SynapseError",
|
||||||
|
"ConfigError",
|
||||||
|
]
|
||||||
|
|
Loading…
Reference in New Issue