Do i need to declare none for mypy pytest functions?

Viewed 43

So i basically just read in the documentation that

If a function does not explicitly return a value, give it a return type of None. Using a None result in a statically typed context results in a type check error

Does that also include pytest functions? Do i have to annotate every pytest func with None?

1 Answers

Yes, or run mypy with --check-untyped-defs, though of course that may hide other functions you've forgotten to annotate

Related