tsuyoshicho / action-mypy

Run mypy with reviewdog on pull requests to improve code writing experience.
Creative Commons Zero v1.0 Universal
20 stars 8 forks source link

Feature request: Multiple targets for mypy #86

Closed mnschmit closed 1 year ago

mnschmit commented 1 year ago

Hi @tsuyoshicho, first of all, thank you for this very useful action!

I had a little problem using it in my GitHub workflow because it only supports a single target at the moment. I tried putting multiple files separated by white space in the target input of the action (like file1 file2), but I saw that this line quotes the target and therefore mypy looks for a single file (or directory) with the name file1 file2, i.e., containing the white space.

The context of why I'd like to do this is that I identify the changed or added files in a pull request using the GitHub action dorny/paths-filter. It supports outputting all changed files in a shell-like list, i.e., with white space as delimiter. I'd like mypy to only lint the changed/added files and not the whole repository because linting issues that weren't introduced by the current PR shouldn't block it from being merged. As a workaround, I tried setting target to "" and putting the list of files in the mypy flags input. Unfortunately, that doesn't work either because then the default value of "." is inserted in the same line I linked above.

Do you think your action could support this use case?

tsuyoshicho commented 1 year ago

I'll think about it. Please wait a while.

tsuyoshicho commented 1 year ago

@mnschmit

87 and #89 for Update target: support multi targets.

So please use next release v3.13.0.

mnschmit commented 1 year ago

Great, thank you!