OXIESEC PANEL
- Current Dir:
/
/
opt
/
cloudlinux
/
venv
/
lib
/
python3.11
/
site-packages
/
isort
Server IP: 2a02:4780:11:1084:0:327f:3464:10
Upload:
Create Dir:
Name
Size
Modified
Perms
📁
..
-
09/05/2025 09:34:06 AM
rwxr-xr-x
📄
__init__.py
871 bytes
12/18/2024 10:23:16 AM
rw-r--r--
📄
__main__.py
36 bytes
12/18/2024 10:23:16 AM
rw-r--r--
📁
__pycache__
-
02/07/2025 10:01:30 PM
rwxr-xr-x
📁
_vendored
-
12/18/2024 10:23:16 AM
rwxr-xr-x
📄
_version.py
72 bytes
12/18/2024 10:23:16 AM
rw-r--r--
📄
api.py
25.51 KB
12/18/2024 10:23:16 AM
rw-r--r--
📄
comments.py
933 bytes
12/18/2024 10:23:16 AM
rw-r--r--
📄
core.py
22 KB
12/18/2024 10:23:16 AM
rw-r--r--
📁
deprecated
-
02/07/2025 10:01:30 PM
rwxr-xr-x
📄
exceptions.py
6.89 KB
12/18/2024 10:23:16 AM
rw-r--r--
📄
files.py
1.55 KB
12/18/2024 10:23:16 AM
rw-r--r--
📄
format.py
5.35 KB
12/18/2024 10:23:16 AM
rw-r--r--
📄
hooks.py
3.26 KB
12/18/2024 10:23:16 AM
rw-r--r--
📄
identify.py
8.18 KB
12/18/2024 10:23:16 AM
rw-r--r--
📄
io.py
2.16 KB
12/18/2024 10:23:16 AM
rw-r--r--
📄
literal.py
3.63 KB
12/18/2024 10:23:16 AM
rw-r--r--
📄
logo.py
388 bytes
12/18/2024 10:23:16 AM
rw-r--r--
📄
main.py
45.73 KB
12/18/2024 10:23:16 AM
rw-r--r--
📄
output.py
27.15 KB
12/18/2024 10:23:16 AM
rw-r--r--
📄
parse.py
24.74 KB
12/18/2024 10:23:16 AM
rw-r--r--
📄
place.py
5.05 KB
12/18/2024 10:23:16 AM
rw-r--r--
📄
profiles.py
2.09 KB
12/18/2024 10:23:16 AM
rw-r--r--
📄
py.typed
0 bytes
12/18/2024 10:23:16 AM
rw-r--r--
📄
pylama_isort.py
1.28 KB
12/18/2024 10:23:16 AM
rw-r--r--
📄
sections.py
297 bytes
12/18/2024 10:23:16 AM
rw-r--r--
📄
settings.py
34.75 KB
12/18/2024 10:23:16 AM
rw-r--r--
📄
setuptools_commands.py
2.24 KB
12/18/2024 10:23:16 AM
rw-r--r--
📄
sorting.py
4.41 KB
12/18/2024 10:23:16 AM
rw-r--r--
📁
stdlibs
-
02/07/2025 10:01:30 PM
rwxr-xr-x
📄
utils.py
2.36 KB
12/18/2024 10:23:16 AM
rw-r--r--
📄
wrap.py
6.17 KB
12/18/2024 10:23:16 AM
rw-r--r--
📄
wrap_modes.py
13.25 KB
12/18/2024 10:23:16 AM
rw-r--r--
Editing: pylama_isort.py
Close
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 []