|
17 | 17 |
|
18 | 18 | import argparse |
19 | 19 | import sys |
| 20 | +from typing import Optional, Dict, List, Any |
20 | 21 |
|
21 | 22 | from google.ads.googleads.client import GoogleAdsClient |
22 | 23 | from google.ads.googleads.errors import GoogleAdsException |
23 | 24 |
|
24 | 25 | _DEFAULT_LOG_SPACE_LENGTH = 4 |
25 | 26 |
|
26 | 27 |
|
27 | | -def account_hierarchy_module(google_ads_client, customer_id): |
| 28 | +def account_hierarchy_module(google_ads_client: GoogleAdsClient, customer_id: Optional[str]): |
28 | 29 | """Print the account hierarchy for the given login customer ID. |
29 | 30 |
|
30 | 31 | Args: |
@@ -74,7 +75,7 @@ def account_hierarchy_module(google_ads_client, customer_id): |
74 | 75 | # Performs a breadth-first search to build a Dictionary that maps |
75 | 76 | # managers to their child accounts (customer_ids_to_child_accounts). |
76 | 77 | unprocessed_customer_ids = [seed_customer_id] |
77 | | - customer_ids_to_child_accounts = dict() |
| 78 | + customer_ids_to_child_accounts: Dict[str, List[Any]] = dict() |
78 | 79 | root_customer_client = None |
79 | 80 |
|
80 | 81 | while unprocessed_customer_ids: |
@@ -129,7 +130,7 @@ def account_hierarchy_module(google_ads_client, customer_id): |
129 | 130 |
|
130 | 131 |
|
131 | 132 | def print_account_hierarchy( |
132 | | - customer_client, customer_ids_to_child_accounts, depth |
| 133 | + customer_client: Any, customer_ids_to_child_accounts: Dict[str, List[Any]], depth: int |
133 | 134 | ): |
134 | 135 | """Prints the specified account's hierarchy using recursion. |
135 | 136 |
|
@@ -157,7 +158,7 @@ def print_account_hierarchy( |
157 | 158 | ) |
158 | 159 |
|
159 | 160 |
|
160 | | -def get_users_module(google_ads_client, customer_id): |
| 161 | +def get_users_module(google_ads_client: GoogleAdsClient, customer_id: Optional[str]): |
161 | 162 | """Prints the user access information for the given customer_id. |
162 | 163 |
|
163 | 164 | Args: |
|
0 commit comments