Skip to content

Commit

Permalink
chore: apply style suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
vicferpoy committed Nov 14, 2024
1 parent fa952ac commit c5668d1
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions prowler/providers/azure/azure_provider.py
Original file line number Diff line number Diff line change
Expand Up @@ -974,7 +974,7 @@ def get_locations(self) -> dict[str, list[str]]:
locations[display_name].append(location.name)

return locations

def get_regions(self, subscription_ids: Union[list[str], None] = None) -> set:
"""
Retrieves a set of regions available across all subscriptions or specific subscriptions if provided.
Expand All @@ -996,10 +996,14 @@ def get_regions(self, subscription_ids: Union[list[str], None] = None) -> set:
"""
locations = self.get_locations()
if subscription_ids is not None:
locations = {sid: regions for sid, regions in locations.items() if sid in subscription_ids}
locations = {
sid: regions
for sid, regions in locations.items()
if sid in subscription_ids
}

return set(chain.from_iterable(locations.values()))

@staticmethod
def validate_static_credentials(
tenant_id: str = None, client_id: str = None, client_secret: str = None
Expand Down

0 comments on commit c5668d1

Please sign in to comment.