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

Add missing type hints to synapse.appservice #11360

Merged
merged 11 commits into from
Dec 14, 2021
Prev Previous commit
Next Next commit
Merge remote-tracking branch 'origin/develop' into clokep/appservice-…
…types
  • Loading branch information
clokep committed Dec 9, 2021
commit 4f52c73da2b7e1d9ac2c4021a9aaca1eef385cb5
2 changes: 2 additions & 0 deletions synapse/appservice/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,10 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

import logging
import re
from enum import Enum
from typing import TYPE_CHECKING, Dict, Iterable, List, Optional, Pattern

import attr
Expand Down
6 changes: 4 additions & 2 deletions synapse/storage/databases/main/appservice.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,9 @@ class ApplicationServiceStore(ApplicationServiceWorkerStore):
class ApplicationServiceTransactionWorkerStore(
ApplicationServiceWorkerStore, EventsWorkerStore
):
async def get_appservices_by_state(self, state: str) -> List[ApplicationService]:
async def get_appservices_by_state(
self, state: ApplicationServiceState
) -> List[ApplicationService]:
"""Get a list of application services based on their state.

Args:
Expand Down Expand Up @@ -175,7 +177,7 @@ async def get_appservice_state(
return None

async def set_appservice_state(
self, service: ApplicationService, state: str
self, service: ApplicationService, state: ApplicationServiceState
) -> None:
"""Set the application service state.

Expand Down
You are viewing a condensed version of this merge commit. You can view the full changes here.