chore: add type validation to core commands
adds pydantic type checks to all renku.core.command commands. This way we don't need to check if something decorated as one type is actually another type.
It already helped to find some bugs that I fixed here as well.
closes #3188
I had to resolve conflicts but the conflicts were only in the poetry.lock file which were fixed by simply re-locking the file. So my approving this PR is still OK IMO.
@Panaetius now mypy fails in a bunch of places. Not sure how it did not fail before.
There's only 3 errors, the rest note: By default the bodies of untyped functions are not checked, consider using --check-untyped-defs [annotation-unchecked] is just a warning
renku/command/login.py:138: error: Argument "repository" to "_set_git_credential_helper" has incompatible type "Optional[Repository]"; expected "Repository" [arg-type]
renku/command/login.py:148: error: Argument "repository" to "_set_renku_url_for_remote" has incompatible type "Optional[Repository]"; expected "Repository" [arg-type]
renku/command/init.py:184: error: Argument "input_parameters" to "set_template_parameters" has incompatible type "Optional[Dict[str, str]]"; expected "Dict[str, str]" [arg-type]