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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect linting for DAG/Steps input list #976

Open
2 of 6 tasks
elliotgunton opened this issue Feb 23, 2024 · 0 comments
Open
2 of 6 tasks

Incorrect linting for DAG/Steps input list #976

elliotgunton opened this issue Feb 23, 2024 · 0 comments
Labels
type:bug A general bug

Comments

@elliotgunton
Copy link
Collaborator

Pre-bug-report checklist

1. This bug can be reproduced using pure Argo YAML

If yes, it is more likely to be an Argo bug unrelated to Hera. Please double check before submitting an issue to Hera.

2. This bug occurs in Hera when...

  • exporting to YAML
  • submitting to Argo
  • running on Argo with the Hera runner
  • other: linting Hera code

Bug report

Describe the bug
A clear and concise description of what the bug is:

Passing a list of Parameter to a DAG or Steps inputs gives a mypy linting error:

error: Argument "inputs" to "DAG" has incompatible type "list[hera.workflows.parameter.Parameter]"; 
expected "Inputs | hera.workflows.parameter.Parameter | hera.workflows.models.io.argoproj.workflow.v1alpha1.Parameter | hera.workflows.artifact.Artifact | 
hera.workflows.models.io.argoproj.workflow.v1alpha1.Artifact | dict[str, Any] | list[hera.workflows.parameter.Parameter | hera.workflows.models.io.argoproj.workflow.v1alpha1.Parameter | 
hera.workflows.artifact.Artifact | hera.workflows.models.io.argoproj.workflow.v1alpha1.Artifact | dict[str, Any]] | 
None"  [arg-type]

To Reproduce
Full Hera code to reproduce the bug:

from hera.workflows import Workflow

my_inputs = [Parameter(name="a-param")]

with Workflow(name="my-workflow") as w:
    with DAG(name="dag", inputs=my_inputs):
        pass

Expected behavior
A clear and concise description of what you expected to happen:
Linting to pass

Environment

  • Hera Version: 5.14.1
  • Python Version: 3.11

Additional context
Add any other context about the problem here.

@elliotgunton elliotgunton added the type:bug A general bug label Feb 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:bug A general bug
Projects
None yet
Development

No branches or pull requests

1 participant