/opt/imh-python/lib/python3.9/site-packages/isort
NameSizeModeActions
deprecated/-0755rm
stdlibs/-0755rm
_vendored/-0755rm
__pycache__/-0755rm
api.py264330644editdlrm
comments.py9330644editdlrm
core.py227030644editdlrm
exceptions.py70610644editdlrm
files.py15890644editdlrm
format.py54830644editdlrm
hooks.py33390644editdlrm
identify.py83440644editdlrm
io.py22170644editdlrm
literal.py36950644editdlrm
logo.py3880644editdlrm
main.py471340644editdlrm
output.py280300644editdlrm
parse.py255720644editdlrm
place.py51710644editdlrm
profiles.py22980644editdlrm
py.typed00644editdlrm
pylama_isort.py13080644editdlrm
sections.py2980644editdlrm
settings.py356000644editdlrm
setuptools_commands.py23560644editdlrm
sorting.py44960644editdlrm
utils.py24700644editdlrm
wrap.py63910644editdlrm
wrap_modes.py134470644editdlrm
_version.py720644editdlrm
__init__.py8720644editdlrm
__main__.py360644editdlrm
Edit: /opt/imh-python/lib/python3.9/site-packages/isort/files.py (1589B)
import os from pathlib import Path from typing import Iterable, Iterator, List, Set from isort.settings import Config def find( paths: Iterable[str], config: Config, skipped: List[str], broken: List[str] ) -> Iterator[str]: """Fines and provides an iterator for all Python source files defined in paths.""" visited_dirs: Set[Path] = set() for path in paths: if os.path.isdir(path): for dirpath, dirnames, filenames in os.walk( path, topdown=True, followlinks=config.follow_links ): base_path = Path(dirpath) for dirname in list(dirnames): full_path = base_path / dirname resolved_path = full_path.resolve() if config.is_skipped(full_path): skipped.append(dirname) dirnames.remove(dirname) else: if resolved_path in visited_dirs: # pragma: no cover dirnames.remove(dirname) visited_dirs.add(resolved_path) for filename in filenames: filepath = os.path.join(dirpath, filename) if config.is_supported_filetype(filepath): if config.is_skipped(Path(os.path.abspath(filepath))): skipped.append(filename) else: yield filepath elif not os.path.exists(path): broken.append(path) else: yield path