Skip to content

Commit

Permalink
Linting
Browse files Browse the repository at this point in the history
  • Loading branch information
jshcodes committed Jun 9, 2023
1 parent d011228 commit 5883efc
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 9 deletions.
13 changes: 7 additions & 6 deletions src/falconpy/_payload/_d4c_registration.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,21 +87,22 @@ def azure_registration_payload(passed_keywords: dict) -> dict:
returned_payload = {}
returned_payload["resources"] = []
keys = ["account_type", "client_id", "subscription_id", "tenant_id"]
item = {}
item = {}
for key in keys:
if passed_keywords.get(key, None):
item[key] = passed_keywords.get(key, None)
if passed_keywords.get("default_subscription", None) is not None:

if passed_keywords.get("default_subscription", None) is not None:
item["default_subscription"] = passed_keywords.get("default_subscription", None)

if passed_keywords.get("years_valid", -1) >= 0:
item["years_valid"] = passed_keywords.get("years_valid", -1)

returned_payload["resources"].append(item)

return returned_payload


def gcp_registration_payload(passed_keywords: dict) -> dict:
"""Create a properly formatted Azure registration payload.
Expand All @@ -117,11 +118,11 @@ def gcp_registration_payload(passed_keywords: dict) -> dict:
returned_payload = {}
returned_payload["resources"] = []
keys = ["parent_id", "parent_type"]
item = {}
item = {}
for key in keys:
if passed_keywords.get(key, None):
item[key] = passed_keywords.get(key, None)

returned_payload["resources"].append(item)

return returned_payload
2 changes: 1 addition & 1 deletion src/falconpy/cspm_registration.py
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ def create_azure_account(self: object, body: dict = None, **kwargs) -> dict:
default_subscription -- Indicate if this is the default subscription. Boolean.
subscription_id -- Azure Subscription ID. String.
tenant_id -- Azure Tenant ID. String.
years_valid -- Number of years this account is valid. Integer.
years_valid -- Number of years this account is valid. Integer.
This method only supports keywords for providing arguments.
Expand Down
4 changes: 2 additions & 2 deletions src/falconpy/user_management.py
Original file line number Diff line number Diff line change
Expand Up @@ -796,7 +796,7 @@ def create_user(self: object, body: dict = None, **kwargs) -> dict:
After creating a user, assign one or more roles with `grant_user_role_ids`.
DEPRECATED: Please use createUserV1 instead.
HTTP Method: POST
Swagger URL
Expand Down Expand Up @@ -1007,7 +1007,7 @@ def retrieve_user_uuid(self: object, *args, parameters: dict = None, **kwargs) -
"""Get a user's ID by providing a username (usually an email address).
DEPRECATED: Please use queryUserV1 instead.
HTTP Method: GET
Swagger URL
Expand Down

0 comments on commit 5883efc

Please sign in to comment.