Change HomeServer definition to work with typing.
Duplicating function signatures between server.py and server.pyi is silly. This commit changes that by changing all `build_*` methods to `get_*` methods and changing the `_make_dependency_method` to work work as a descriptor that caches the produced value. There are some changes in other files that were made to fix the typing in server.py.
Showing
- synapse/app/generic_worker.py 5 additions, 3 deletionssynapse/app/generic_worker.py
- synapse/handlers/oidc_handler.py 5 additions, 3 deletionssynapse/handlers/oidc_handler.py
- synapse/secrets.py 6 additions, 2 deletionssynapse/secrets.py
- synapse/server.py 231 additions, 224 deletionssynapse/server.py
- synapse/server.pyi 0 additions, 155 deletionssynapse/server.pyi
- synapse/storage/databases/__init__.py 16 additions, 12 deletionssynapse/storage/databases/__init__.py
- tox.ini 1 addition, 0 deletionstox.ini
Loading
Please register or sign in to comment