Skip to content

Commit

Permalink
Use assigment expression to reduce some redundancy
Browse files Browse the repository at this point in the history
  • Loading branch information
samdoran committed May 7, 2024
1 parent 6826fb2 commit 3d84879
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions nise/generators/aws/aws_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -324,8 +324,7 @@ def _init_data_row(self, start, end, **kwargs): # noqa: C901
def _get_location(self):
"""Pick instance location."""
options = None
if self.attributes and self.attributes.get("region"):
region = self.attributes.get("region")
if region := self.attributes.get("region"):
options = [option for option in REGIONS if region in option]
if options:
location = choice(options)
Expand Down

0 comments on commit 3d84879

Please sign in to comment.