GRAYBYTE WORDPRESS FILE MANAGER9787

Server IP : 198.54.121.189 / Your IP : 216.73.216.112
System : Linux premium69.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
PHP Version : 7.4.33
Disable Function : NONE
cURL : ON | WGET : ON | Sudo : OFF | Pkexec : OFF
Directory : /opt/hc_python/lib/python3.12/site-packages/sqlalchemy/engine/
Upload Files :
Current_dir [ Not Writeable ] Document_root [ Writeable ]

Command :


Current 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")

[ Back ]
Name
Size
Last Modified
Owner / Group
Permissions
Options
..
--
April 04 2025 08:00:23
root / root
0755
__pycache__
--
April 04 2025 08:00:23
root / root
0755
__init__.py
2.752 KB
April 04 2025 08:00:23
root / root
0644
_py_processors.py
3.656 KB
April 04 2025 08:00:23
root / root
0644
_py_row.py
3.698 KB
April 04 2025 08:00:23
root / root
0644
_py_util.py
2.426 KB
April 04 2025 08:00:23
root / root
0644
base.py
120.021 KB
April 04 2025 08:00:23
root / root
0644
characteristics.py
4.653 KB
April 04 2025 08:00:23
root / root
0644
create.py
32.438 KB
April 04 2025 08:00:23
root / root
0644
cursor.py
74.517 KB
April 04 2025 08:00:23
root / root
0644
default.py
82.72 KB
April 04 2025 08:00:23
root / root
0644
events.py
36.523 KB
April 04 2025 08:00:23
root / root
0644
interfaces.py
110.38 KB
April 04 2025 08:00:23
root / root
0644
mock.py
4.083 KB
April 04 2025 08:00:23
root / root
0644
processors.py
2.323 KB
April 04 2025 08:00:23
root / root
0644
reflection.py
73.616 KB
April 04 2025 08:00:23
root / root
0644
result.py
75.816 KB
April 04 2025 08:00:23
root / root
0644
row.py
11.749 KB
April 04 2025 08:00:23
root / root
0644
strategies.py
0.432 KB
April 04 2025 08:00:23
root / root
0644
url.py
30.341 KB
April 04 2025 08:00:23
root / root
0644
util.py
5.549 KB
April 04 2025 08:00:23
root / root
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2025
CONTACT ME
Static GIF