Skip to content

Commit

Permalink
Fix mypy and pylint complaints
Browse files Browse the repository at this point in the history
  • Loading branch information
galenguyer committed Aug 25, 2022
1 parent f1069c8 commit 60987e2
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions packet/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,16 +65,15 @@ def is_freshman_on_floor(rit_username: str) -> bool:
return False


# pylint: disable=inconsistent-return-statements
@app.before_request
def before_reqest_callback():
def before_reqest_callback() -> Any:
"""
Pre-request function to ensure we're on the right URL before OIDC sees anything
"""
if urlparse(request.base_url).hostname != app.config['SERVER_NAME']:
return redirect(request.base_url.replace(urlparse(request.base_url).hostname,
app.config['SERVER_NAME']), code=302)

return None

def packet_auth(func: WrappedFunc) -> WrappedFunc:
"""
Expand Down

0 comments on commit 60987e2

Please sign in to comment.