mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 05:07:41 +00:00
Fix implicit-return in foursquare (#122843)
This commit is contained in:
parent
e7971f5a67
commit
fd7c92879c
@ -3,6 +3,7 @@
|
||||
from http import HTTPStatus
|
||||
import logging
|
||||
|
||||
from aiohttp import web
|
||||
import requests
|
||||
import voluptuous as vol
|
||||
|
||||
@ -85,11 +86,11 @@ class FoursquarePushReceiver(HomeAssistantView):
|
||||
url = "/api/foursquare"
|
||||
name = "foursquare"
|
||||
|
||||
def __init__(self, push_secret):
|
||||
def __init__(self, push_secret: str) -> None:
|
||||
"""Initialize the OAuth callback view."""
|
||||
self.push_secret = push_secret
|
||||
|
||||
async def post(self, request):
|
||||
async def post(self, request: web.Request) -> web.Response | None:
|
||||
"""Accept the POST from Foursquare."""
|
||||
try:
|
||||
data = await request.json()
|
||||
@ -107,3 +108,4 @@ class FoursquarePushReceiver(HomeAssistantView):
|
||||
return self.json_message("Incorrect secret", HTTPStatus.BAD_REQUEST)
|
||||
|
||||
request.app[KEY_HASS].bus.async_fire(EVENT_PUSH, data)
|
||||
return None
|
||||
|
Loading…
x
Reference in New Issue
Block a user