SILENT KILLERPanel

Current Path: > > opt > hc_python > > > lib > python3.12 > site-packages > sqlalchemy > engine > >


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/hc_python///lib/python3.12/site-packages/sqlalchemy/engine//

NameTypeSizeLast ModifiedActions
__pycache__ Directory - -
__init__.py File 2818 bytes April 04 2025 08:02:28.
_py_processors.py File 3744 bytes April 04 2025 08:02:28.
_py_row.py File 3787 bytes April 04 2025 08:02:28.
_py_util.py File 2484 bytes April 04 2025 08:02:28.
base.py File 122901 bytes April 04 2025 08:02:28.
characteristics.py File 4765 bytes April 04 2025 08:02:28.
create.py File 33217 bytes April 04 2025 08:02:28.
cursor.py File 76305 bytes April 04 2025 08:02:28.
default.py File 84705 bytes April 04 2025 08:02:28.
events.py File 37400 bytes April 04 2025 08:02:28.
interfaces.py File 113029 bytes April 04 2025 08:02:28.
mock.py File 4181 bytes April 04 2025 08:02:28.
processors.py File 2379 bytes April 04 2025 08:02:28.
reflection.py File 75383 bytes April 04 2025 08:02:28.
result.py File 77636 bytes April 04 2025 08:02:28.
row.py File 12031 bytes April 04 2025 08:02:28.
strategies.py File 442 bytes April 04 2025 08:02:28.
url.py File 31069 bytes April 04 2025 08:02:28.
util.py File 5682 bytes April 04 2025 08:02:28.

Reading File: //opt/hc_python///lib/python3.12/site-packages/sqlalchemy/engine///_py_util.py

# engine/_py_util.py
# Copyright (C) 2005-2025 the SQLAlchemy authors and contributors
# <see AUTHORS file>
#
# This module is part of SQLAlchemy and is released under
# the MIT License: https://www.opensource.org/licenses/mit-license.php
from __future__ import annotations

import typing
from typing import Any
from typing import Mapping
from typing import Optional
from typing import Tuple

from .. import exc

if typing.TYPE_CHECKING:
    from .interfaces import _CoreAnyExecuteParams
    from .interfaces import _CoreMultiExecuteParams
    from .interfaces import _DBAPIAnyExecuteParams
    from .interfaces import _DBAPIMultiExecuteParams


_no_tuple: Tuple[Any, ...] = ()


def _distill_params_20(
    params: Optional[_CoreAnyExecuteParams],
) -> _CoreMultiExecuteParams:
    if params is None:
        return _no_tuple
    # Assume list is more likely than tuple
    elif isinstance(params, list) or isinstance(params, tuple):
        # collections_abc.MutableSequence): # avoid abc.__instancecheck__
        if params and not isinstance(params[0], (tuple, Mapping)):
            raise exc.ArgumentError(
                "List argument must consist only of tuples or dictionaries"
            )

        return params
    elif isinstance(params, dict) or isinstance(
        # only do immutabledict or abc.__instancecheck__ for Mapping after
        # we've checked for plain dictionaries and would otherwise raise
        params,
        Mapping,
    ):
        return [params]
    else:
        raise exc.ArgumentError("mapping or list expected for parameters")


def _distill_raw_params(
    params: Optional[_DBAPIAnyExecuteParams],
) -> _DBAPIMultiExecuteParams:
    if params is None:
        return _no_tuple
    elif isinstance(params, list):
        # collections_abc.MutableSequence): # avoid abc.__instancecheck__
        if params and not isinstance(params[0], (tuple, Mapping)):
            raise exc.ArgumentError(
                "List argument must consist only of tuples or dictionaries"
            )

        return params
    elif isinstance(params, (tuple, dict)) or isinstance(
        # only do abc.__instancecheck__ for Mapping after we've checked
        # for plain dictionaries and would otherwise raise
        params,
        Mapping,
    ):
        # cast("Union[List[Mapping[str, Any]], Tuple[Any, ...]]", [params])
        return [params]  # type: ignore
    else:
        raise exc.ArgumentError("mapping or sequence expected for parameters")

SILENT KILLER Tool