diff --git a/isort/deprecated/finders.py b/isort/deprecated/finders.py index 45c85e71..4f99a5dc 100644 --- a/isort/deprecated/finders.py +++ b/isort/deprecated/finders.py @@ -233,7 +233,6 @@ def _load_mapping() -> Optional[Dict[str, str]]: import_name, _, pypi_name = line.strip().partition(":") mappings[pypi_name] = import_name return mappings - # return dict(tuple(line.strip().split(":")[::-1]) for line in f) def _load_names(self) -> List[str]: """Return list of thirdparty modules from requirements""" diff --git a/isort/settings.py b/isort/settings.py index 0a7211c6..7f66dc47 100644 --- a/isort/settings.py +++ b/isort/settings.py @@ -554,8 +554,7 @@ def is_supported_filetype(self, file_name: str) -> bool: line = fp.readline(100) except OSError: return False - else: - return bool(_SHEBANG_RE.match(line)) + return bool(_SHEBANG_RE.match(line)) def _check_folder_git_ls_files(self, folder: str) -> Optional[Path]: env = {**os.environ, "LANG": "C.UTF-8"}