Easy warning fixups for mypy
xref #27396 @simonjayhawkins some of these were just easy cleanups. 

Didn't look through all but some of the others are more complicated and probably require in depth review
thanks!