SILENT KILLERPanel

Current Path: > > opt > cloudlinux > venv > lib64 > python3.11 > > > site-packages > isort


Operation   : Linux premium131.web-hosting.com 4.18.0-553.44.1.lve.el8.x86_64 #1 SMP Thu Mar 13 14:29:12 UTC 2025 x86_64
Software     : Apache
Server IP    : 162.0.232.56 | Your IP: 216.73.216.111
Domains      : 1034 Domain(s)
Permission   : [ 0755 ]

Files and Folders in: //opt/cloudlinux/venv/lib64/python3.11///site-packages/isort

NameTypeSizeLast ModifiedActions
__pycache__ Directory - -
_vendored Directory - -
deprecated Directory - -
stdlibs Directory - -
__init__.py File 871 bytes April 17 2025 13:10:58.
__main__.py File 36 bytes April 17 2025 13:10:58.
_version.py File 72 bytes April 17 2025 13:10:58.
api.py File 26120 bytes April 17 2025 13:10:58.
comments.py File 933 bytes April 17 2025 13:10:58.
core.py File 22525 bytes April 17 2025 13:10:58.
exceptions.py File 7060 bytes April 17 2025 13:10:58.
files.py File 1589 bytes April 17 2025 13:10:58.
format.py File 5483 bytes April 17 2025 13:10:58.
hooks.py File 3338 bytes April 17 2025 13:10:58.
identify.py File 8373 bytes April 17 2025 13:10:58.
io.py File 2216 bytes April 17 2025 13:10:58.
literal.py File 3713 bytes April 17 2025 13:10:58.
logo.py File 388 bytes April 17 2025 13:10:58.
main.py File 46823 bytes April 17 2025 13:10:58.
output.py File 27804 bytes April 17 2025 13:10:58.
parse.py File 25332 bytes April 17 2025 13:10:58.
place.py File 5171 bytes April 17 2025 13:10:58.
profiles.py File 2144 bytes April 17 2025 13:10:58.
py.typed File 0 bytes April 17 2025 13:10:58.
pylama_isort.py File 1308 bytes April 17 2025 13:10:58.
sections.py File 297 bytes April 17 2025 13:10:58.
settings.py File 35584 bytes April 17 2025 13:10:58.
setuptools_commands.py File 2297 bytes April 17 2025 13:10:58.
sorting.py File 4515 bytes April 17 2025 13:10:58.
utils.py File 2413 bytes April 17 2025 13:10:58.
wrap.py File 6321 bytes April 17 2025 13:10:58.
wrap_modes.py File 13569 bytes April 17 2025 13:10:58.

Reading File: //opt/cloudlinux/venv/lib64/python3.11///site-packages/isort/setuptools_commands.py

import glob
import os
import sys
from typing import Any, Dict, Iterator, List
from warnings import warn

import setuptools  # type: ignore

from . import api
from .settings import DEFAULT_CONFIG


class ISortCommand(setuptools.Command):  # type: ignore
    """The :class:`ISortCommand` class is used by setuptools to perform
    imports checks on registered modules.
    """

    description = "Run isort on modules registered in setuptools"
    user_options: List[Any] = []

    def initialize_options(self) -> None:
        default_settings = vars(DEFAULT_CONFIG).copy()
        for key, value in default_settings.items():
            setattr(self, key, value)

    def finalize_options(self) -> None:
        """Get options from config files."""
        self.arguments: Dict[str, Any] = {}  # skipcq: PYL-W0201
        self.arguments["settings_path"] = os.getcwd()

    def distribution_files(self) -> Iterator[str]:
        """Find distribution packages."""
        # This is verbatim from flake8
        if self.distribution.packages:  # pragma: no cover
            package_dirs = self.distribution.package_dir or {}
            for package in self.distribution.packages:
                pkg_dir = package
                if package in package_dirs:
                    pkg_dir = package_dirs[package]
                elif "" in package_dirs:  # pragma: no cover
                    pkg_dir = package_dirs[""] + os.path.sep + pkg_dir
                yield pkg_dir.replace(".", os.path.sep)

        if self.distribution.py_modules:
            for filename in self.distribution.py_modules:
                yield f"{filename}.py"
        # Don't miss the setup.py file itself
        yield "setup.py"

    def run(self) -> None:
        arguments = self.arguments
        wrong_sorted_files = False
        for path in self.distribution_files():
            for python_file in glob.iglob(os.path.join(path, "*.py")):
                try:
                    if not api.check_file(python_file, **arguments):
                        wrong_sorted_files = True  # pragma: no cover
                except OSError as error:  # pragma: no cover
                    warn(f"Unable to parse file {python_file} due to {error}")
        if wrong_sorted_files:
            sys.exit(1)  # pragma: no cover

SILENT KILLER Tool