Closed abelcheung closed 1 year ago
Hi @abelcheung , Thank you for your suggestion.
I understand your suggestion.
However, I would like to hold off because the effect is limited.
The reasons are as follows.
We will support it in the next major version https://github.com/tsuyoshicho/action-mypy/issues/70
PR is welcome.
Note:
Now you can specify the version directly in setup_command
.
* Essentially, you should have your own requirements.txt for your environment and set it up yourself * If you want to use a fixed version of mypy, you need to fix it yourself and use the same one on local and on CI, otherwise you are likely to have problems
Yes, these 2 are the exact reason why I want to see action-mypy
allowing users to specify mypy
version. In a CI workflow all tools need some way to set tools versions.
Many python related tools use requirements.txt
or pyproject.toml
, tox
has its own tox.ini
to achieve the same effect, and so on. But I originally thought action-mypy
doesn't have any.
You have pointed me to setup_command
and it can achieve the same result, so I guess my suggestion can be closed, thanks a lot!
Sometimes people may not want to use the latest
mypy
for testing, becausemypy
can change its type checking output format (for example,Tuple[...]
is changed totuple[...]
in 1.4, andUnion[a, b]
becomesa | b
) . People who run automatic test suite would want to pin to a very specificmypy
version.Indeed, it is possible to pin to a specific
action-mypy
commit in GitHub workflow instead, but that also means people are unable to use any new features in latestaction-mypy
.To be concise, I mean something like: