File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change 11#!/usr/bin/env python
22# Copyright 2018 Google LLC
3+
4+ from typing import List , Dict
35#
46# Licensed under the Apache License, Version 2.0 (the "License");
57# you may not use this file except in compliance with the License.
4951_REDIRECT_URI = f"http://{ _SERVER } :{ _PORT } "
5052
5153
52- def main (client_secrets_path , scopes ) :
54+ def main (client_secrets_path : str , scopes : List [ str ]) -> None :
5355 """The main method, starts a basic server and initializes an auth request.
5456
5557 Args:
@@ -96,7 +98,7 @@ def main(client_secrets_path, scopes):
9698 )
9799
98100
99- def get_authorization_code (passthrough_val ) :
101+ def get_authorization_code (passthrough_val : str ) -> str :
100102 """Opens a socket to handle a single HTTP request containing auth tokens.
101103
102104 Args:
@@ -145,7 +147,7 @@ def get_authorization_code(passthrough_val):
145147 return params .get ("code" )
146148
147149
148- def parse_raw_query_params (data ) :
150+ def parse_raw_query_params (data : bytes ) -> Dict [ str , str ] :
149151 """Parses a raw HTTP request to extract its query params as a dict.
150152
151153 Note that this logic is likely irrelevant if you're building OAuth logic
You can’t perform that action at this time.
0 commit comments