Optimization Cleanup main imports
`import types` is an unused import in main.py, therefore, removed.
Also, using `isinstance()` is the preferred way to access the type.
The isinstance() function checks if the object (first argument)
is an instance or subclass of classinfo class (second argument).
Here object is the 'url' to be checked and classinfo is a string
type.
import hashlib
import fnmatch
import subprocess
-import types
import shutil
import glob
import io
if config.get("sources"):
for url in config.get("sources"):
- if type(url) not in [type("")]:
+ if not isinstance(url, str):
raise exceptions.InvalidConfigurationError(
"Invalid datatype for source URL: %s" % (str(url)))
url = (url % internal_params, http_header, checksum)