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

Improve linting with automatic type checking #131

Open
nuwang opened this issue May 29, 2024 · 0 comments
Open

Improve linting with automatic type checking #131

nuwang opened this issue May 29, 2024 · 0 comments

Comments

@nuwang
Copy link
Member

nuwang commented May 29, 2024

Make tpv lint surround each expression with a fake, type annotated function, and perform type checking on that generated function using mypy.

@mvdbeek

say you’re doing x = job.History somewhere in an expression. Write that expression out during the lint stage as

def expression(job: galaxy.model.Job):
    x = job.History

run mypy on that and you know this will tell you what went wrong

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

1 participant