GRAYBYTE WORDPRESS FILE MANAGER7355

Server IP : 198.54.121.189 / Your IP : 216.73.216.224
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/cloudlinux/venv/lib/python3.11/site-packages/pydocstyle/
Upload Files :
Current_dir [ Not Writeable ] Document_root [ Writeable ]

Command :


Current File : /opt/cloudlinux/venv/lib/python3.11/site-packages/pydocstyle//utils.py
"""General shared utilities."""
import logging
import re
from itertools import tee, zip_longest
from typing import Any, Iterable, Tuple

# Do not update the version manually - it is managed by `bumpversion`.
log = logging.getLogger(__name__)

#: Regular expression for stripping non-alphanumeric characters
NON_ALPHANUMERIC_STRIP_RE = re.compile(r'[\W_]+')


def is_blank(string: str) -> bool:
    """Return True iff the string contains only whitespaces."""
    return not string.strip()


def pairwise(
    iterable: Iterable,
    default_value: Any,
) -> Iterable[Tuple[Any, Any]]:
    """Return pairs of items from `iterable`.

    pairwise([1, 2, 3], default_value=None) -> (1, 2) (2, 3), (3, None)
    """
    a, b = tee(iterable)
    _ = next(b, default_value)
    return zip_longest(a, b, fillvalue=default_value)


def common_prefix_length(a: str, b: str) -> int:
    """Return the length of the longest common prefix of a and b.

    >>> common_prefix_length('abcd', 'abce')
    3

    """
    for common, (ca, cb) in enumerate(zip(a, b)):
        if ca != cb:
            return common
    return min(len(a), len(b))


def strip_non_alphanumeric(string: str) -> str:
    """Strip string from any non-alphanumeric characters."""
    return NON_ALPHANUMERIC_STRIP_RE.sub('', string)

[ Back ]
Name
Size
Last Modified
Owner / Group
Permissions
Options
..
--
June 25 2025 08:31:36
root / root
0755
__pycache__
--
May 15 2025 08:30:34
root / root
0755
data
--
May 15 2025 08:30:34
root / root
0755
__init__.py
0.189 KB
April 17 2025 13:10:58
root / root
0644
__main__.py
0.281 KB
April 17 2025 13:10:58
root / root
0644
_version.py
0.391 KB
April 17 2025 13:10:58
root / root
0644
checker.py
43.832 KB
April 17 2025 13:10:58
root / root
0644
cli.py
2.923 KB
April 17 2025 13:10:58
root / root
0644
config.py
32.703 KB
April 17 2025 13:10:58
root / root
0644
parser.py
27.628 KB
April 17 2025 13:10:58
root / root
0644
utils.py
1.261 KB
April 17 2025 13:10:58
root / root
0644
violations.py
12.12 KB
April 17 2025 13:10:58
root / root
0644
wordlists.py
1.512 KB
April 17 2025 13:10:58
root / root
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2025
CONTACT ME
Static GIF