Skip to content

Commit

Permalink
flake 8
Browse files Browse the repository at this point in the history
  • Loading branch information
elegantmoose committed Feb 21, 2024
1 parent 1e5fe8b commit d237968
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion app/api/v2/handlers/contact_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ async def get_contact_report(self, request: web.Request):
async def get_available_contact_reports(self, request: web.Request):
contacts = self._api_manager.get_available_contact_reports()
return web.json_response(contacts)

async def get_contact_list(self, request: web.Request):
contacts = [dict(name=c.name, description=c.description) for c in self._api_manager.contact_svc.contacts]
return web.json_response(contacts)
6 changes: 3 additions & 3 deletions app/api/v2/security.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,12 +68,12 @@ async def authentication_required_middleware(request, handler):
return await handler(request)
return authentication_required_middleware

"""Allow all 'OPTIONS' request to the server to return 200

This mitigates CORS issues while developing the UI.
"""
@web.middleware
async def pass_option_middleware(request, handler):
"""Allow all 'OPTIONS' request to the server to return 200
This mitigates CORS issues while developing the UI.
"""
if request.method == 'OPTIONS':
raise web.HTTPOk()
return await handler(request)
2 changes: 1 addition & 1 deletion app/ascii_banner.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@


BANNER = """
██████╗ █████╗ ██╗ ██████╗ ███████╗██████╗ █████╗
██████╗ █████╗ ██╗ ██████╗ ███████╗██████╗ █████╗
██╔════╝██╔══██╗██║ ██╔══██╗██╔════╝██╔══██╗██╔══██╗
██║ ███████║██║ ██║ ██║█████╗ ██████╔╝███████║
██║ ██╔══██║██║ ██║ ██║██╔══╝ ██╔══██╗██╔══██║
Expand Down
2 changes: 1 addition & 1 deletion tests/api/v2/handlers/test_payloads_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ async def test_get_payloads(self, api_v2_client, api_cookies):
payloads_list = await resp.json()
assert len(payloads_list) > 0
payload = payloads_list[0]
assert type(payload) == str
assert type(payload) is str

async def test_unauthorized_get_payloads(self, api_v2_client):
resp = await api_v2_client.get('/api/v2/payloads')
Expand Down

0 comments on commit d237968

Please sign in to comment.