If I have a function similar to:
def some_function(paths):
for path in paths:
other_function(path)
what is the correct way to type hint paths? The intention of the function is that each object inside paths is a string, but obviously paths could be a list, tuple, set, numpy array, pandas Series etc. so the following seems too specific:
def some_function(paths: list[str]):
for path in paths:
other_function(path)
Should I be using either Collection or Sequence from the typing module?