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: pylama_isort.py
import os import sys from contextlib import contextmanager from typing import Any, Dict, Iterator, List, Optional from pylama.lint import Linter as BaseLinter # type: ignore from isort.exceptions import FileSkipped from . import api @contextmanager def suppress_stdout() -> Iterator[None]: stdout = sys.stdout with open(os.devnull, "w") as devnull: sys.stdout = devnull yield sys.stdout = stdout class Linter(BaseLinter): # type: ignore def allow(self, path: str) -> bool: """Determine if this path should be linted.""" return path.endswith(".py") def run( self, path: str, params: Optional[Dict[str, Any]] = None, **meta: Any ) -> List[Dict[str, Any]]: """Lint the file. Return an array of error dicts if appropriate.""" with suppress_stdout(): try: if not api.check_file(path, disregard_skip=False, **params or {}): return [ { "lnum": 0, "col": 0, "text": "Incorrectly sorted imports.", "type": "ISORT", } ] except FileSkipped: pass return []
Upload File
Create Folder