Skip to content
This repository has been archived by the owner on Jan 21, 2023. It is now read-only.

Commit

Permalink
refactor: PR feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
yt-ms authored and Midnighter committed Jun 10, 2021
1 parent c387a52 commit c86c2e8
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions src/structurizr/view/view_set.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
"""Provide a set of views onto a software architecture model."""


from itertools import chain
from typing import TYPE_CHECKING, Iterable, List, Optional, Set

from pydantic import Field
Expand Down Expand Up @@ -311,14 +312,14 @@ def create_filtered_view(self, **kwargs) -> FilteredView:

def get_view(self, key: str) -> Optional[AbstractView]:
"""Return the view with the given key, or None."""
all_views = (
self.system_landscape_views
| self.system_context_views
| self.container_views
| self.component_views
| self.deployment_views
| self.dynamic_views
| self.filtered_views
all_views = chain(
self.system_landscape_views,
self.system_context_views,
self.container_views,
self.component_views,
self.deployment_views,
self.dynamic_views,
self.filtered_views,
)
return next((view for view in all_views if view.key == key), None)

Expand Down

0 comments on commit c86c2e8

Please sign in to comment.