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

Commit

Permalink
fix: clean up config and typing
Browse files Browse the repository at this point in the history
  • Loading branch information
Midnighter committed Jun 10, 2021
1 parent d5e487d commit 9d482a5
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 7 deletions.
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ install_requires =
httpx ~= 0.16
importlib_metadata; python_version <'3.8'
ordered-set
pydantic >= 1.7.1
pydantic >= 1.8.2
python-dotenv
python_requires = >=3.6
tests_require =
Expand Down
5 changes: 2 additions & 3 deletions src/structurizr/view/view_set.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@


from itertools import chain
from typing import TYPE_CHECKING, Iterable, List, Optional, TypeVar, Type
from typing import TYPE_CHECKING, Iterable, List, Optional, Type, TypeVar

from pydantic import Field

Expand All @@ -37,7 +37,7 @@


if TYPE_CHECKING:
from ..model import Model, Container # pragma: no cover
from ..model import Model # pragma: no cover


ConcreteView = TypeVar(
Expand Down Expand Up @@ -186,7 +186,6 @@ def hydrate(cls, views: ViewSetIO, model: "Model") -> "ViewSet":
component_views = []
for view_io in views.component_views:
container = model.get_element(view_io.container_id)
assert isinstance(container, Container)
view = ComponentView.hydrate(view_io, container=container)
cls._hydrate_view(view, model=model)
component_views.append(view)
Expand Down
4 changes: 1 addition & 3 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,13 @@ deps =
pytest-raises
passenv =
STRUCTURIZR_*
setenv =
VIRTUALENV_PIP=21.1
commands =
pytest --cov=structurizr --cov-report=term {posargs}

[testenv:isort]
skip_install = True
deps=
isort >=5.0.5
isort
commands=
isort --check-only --diff {toxinidir}/src/structurizr {toxinidir}/tests {toxinidir}/setup.py

Expand Down

0 comments on commit 9d482a5

Please sign in to comment.