X7ROOT File Manager
Current Path:
/opt/cloudlinux/venv/lib/python3.11/site-packages/isort
opt
/
cloudlinux
/
venv
/
lib
/
python3.11
/
site-packages
/
isort
/
ðŸ“
..
📄
__init__.py
(871 B)
📄
__main__.py
(36 B)
ðŸ“
__pycache__
ðŸ“
_vendored
📄
_version.py
(72 B)
📄
api.py
(25.51 KB)
📄
comments.py
(933 B)
📄
core.py
(22 KB)
ðŸ“
deprecated
📄
exceptions.py
(6.89 KB)
📄
files.py
(1.55 KB)
📄
format.py
(5.35 KB)
📄
hooks.py
(3.26 KB)
📄
identify.py
(8.18 KB)
📄
io.py
(2.16 KB)
📄
literal.py
(3.63 KB)
📄
logo.py
(388 B)
📄
main.py
(45.73 KB)
📄
output.py
(27.15 KB)
📄
parse.py
(24.74 KB)
📄
place.py
(5.05 KB)
📄
profiles.py
(2.09 KB)
📄
py.typed
(0 B)
📄
pylama_isort.py
(1.28 KB)
📄
sections.py
(297 B)
📄
settings.py
(34.75 KB)
📄
setuptools_commands.py
(2.24 KB)
📄
sorting.py
(4.41 KB)
ðŸ“
stdlibs
📄
utils.py
(2.36 KB)
📄
wrap.py
(6.17 KB)
📄
wrap_modes.py
(13.25 KB)
Editing: files.py
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
Upload File
Create Folder