Add unit tests to mypy targets; fix typing in tests (part of #116) #121
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is a follow up PR to #120, which solves another part of #116.
It adds the unit tests to the targets of mypy and fixes typing issues in those files.
There are two rules that are ignored for now:
def test_something(input_data):
is sufficient). This is because a) the return type is alwaysNone
anyway, and b) for a lot of the test parameters it would make sense to useAny
anyway.assignment
errors are ignored. This is the main issue of using validataclass and mypy in a project. Defining a validataclass with e.g.foo: int = IntegerValidator()
will result in a type error, because mypy thinks we assign anIntegerValidator
object to an attribute that has the typeint
. To solve this, we probably need a custom mypy-validataclass integration, which will be the main and last part of Support for mypy #116.