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

Operator ">>" not supported for types "ELB" and "list[EC2]" #1029

Closed
tombohub opened this issue Oct 14, 2024 · 3 comments
Closed

Operator ">>" not supported for types "ELB" and "list[EC2]" #1029

tombohub opened this issue Oct 14, 2024 · 3 comments

Comments

@tombohub
Copy link

This example:

from diagrams import Diagram
from diagrams.aws.compute import EC2
from diagrams.aws.database import RDS
from diagrams.aws.network import ELB

with Diagram("Grouped Workers", show=False, direction="TB"):
    ELB("lb") >> [EC2("worker1"),
                  EC2("worker2"),
                  EC2("worker3"),
                  EC2("worker4"),
                  EC2("worker5")] >> RDS("events")

Causes pylance error:

Operator ">>" not supported for types "ELB" and "list[EC2]"

image

@tvqphuoc01
Copy link
Collaborator

Hi @tombohub thanks for reporting this for us we will take a look on this. 😄

@filipeaaoliveira
Copy link
Collaborator

Hi @tombohub @tvqphuoc01

This does raise a concern with Pylance, because indeed the expression is not assigned to any variable, however, in the context of our library, this is intentional because the purpose of the expression is to define the relationships and flow within the diagram.

We can try to work with the Pylance team, to see if we can have an exception for our use case, but I don't know if that is possible.

@tombohub
Copy link
Author

Hi @filipeaaoliveira, ok

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

No branches or pull requests

3 participants