Add typehints to all_sources
and is_source_valid
#454
Merged
all_sources
and is_source_valid
#454