Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update cli_helper.py #7

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

julienschuermans
Copy link

Leverage Type Aliases from the typing module.

This avoids throwing an error in python 3.8 when calling pystructurizr dev --view <filename>:

Traceback (most recent call last):
  File "/path/to/venv/bin/pystructurizr", line 5, in <module>
    from pystructurizr.cli import cli
  File "/path/to/venv/lib/python3.8/site-packages/pystructurizr/cli.py", line 9, in <module>
    from .cli_helper import (ensure_tmp_folder_exists, generate_diagram_code_in_child_process, generate_svg)
  File "/path/to/venv/lib/python3.8/site-packages/pystructurizr/cli_helper.py", line 11, in <module>
    def generate_diagram_code_in_child_process(view: str) -> tuple[dict, list[str]]:
TypeError: 'type' object is not subscriptable

Leverage type hints from `typing`
@julienschuermans julienschuermans deleted the master-1 branch October 16, 2023 15:51
@julienschuermans julienschuermans restored the master-1 branch October 16, 2023 15:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant