$29 GRAYBYTE WORDPRESS FILE MANAGER $58

SERVER : premium201.web-hosting.com #1 SMP Wed Mar 26 12:08:09 UTC 2025
SERVER IP : 104.21.15.130 | ADMIN IP 216.73.217.149
OPTIONS : CRL = ON | WGT = ON | SDO = OFF | PKEX = OFF
DEACTIVATED : NONE

/opt/cloudlinux/venv/lib/python3.11/site-packages/pydocstyle/

HOME
Current File : /opt/cloudlinux/venv/lib/python3.11/site-packages/pydocstyle//wordlists.py
"""Wordlists loaded from package data.

We can treat them as part of the code for the imperative mood check, and
therefore we load them at import time, rather than on-demand.

"""
import pkgutil
import re
from typing import Dict, Iterator, Set

import snowballstemmer

#: Regular expression for stripping comments from the wordlists
COMMENT_RE = re.compile(r'\s*#.*')

#: Stemmer function for stemming words in English
stem = snowballstemmer.stemmer('english').stemWord


def load_wordlist(name: str) -> Iterator[str]:
    """Iterate over lines of a wordlist data file.

    `name` should be the name of a package data file within the data/
    directory.

    Whitespace and #-prefixed comments are stripped from each line.

    """
    data = pkgutil.get_data('pydocstyle', 'data/' + name)
    if data is not None:
        text = data.decode('utf8')
        for line in text.splitlines():
            line = COMMENT_RE.sub('', line).strip()
            if line:
                yield line


def make_imperative_verbs_dict(wordlist: Iterator[str]) -> Dict[str, Set[str]]:
    """Create a dictionary mapping stemmed verbs to the imperative form."""
    imperative_verbs = {}  # type: Dict[str, Set[str]]
    for word in wordlist:
        imperative_verbs.setdefault(stem(word), set()).add(word)
    return imperative_verbs


IMPERATIVE_VERBS = make_imperative_verbs_dict(load_wordlist('imperatives.txt'))

#: Words that are forbidden to appear as the first word in a docstring
IMPERATIVE_BLACKLIST = set(load_wordlist('imperatives_blacklist.txt'))


Current_dir [ NOT WRITEABLE ] Document_root [ WRITEABLE ]


[ Back ]
NAME
SIZE
LAST TOUCH
USER
CAN-I?
FUNCTIONS
..
--
9 Apr 2026 8.31 AM
root / root
0755
__pycache__
--
11 Feb 2026 9.30 AM
root / root
0755
data
--
11 Feb 2026 9.30 AM
root / root
0755
__init__.py
0.189 KB
20 Jan 2026 1.01 PM
root / root
0644
__main__.py
0.281 KB
20 Jan 2026 1.01 PM
root / root
0644
_version.py
0.391 KB
20 Jan 2026 1.01 PM
root / root
0644
checker.py
43.832 KB
20 Jan 2026 1.01 PM
root / root
0644
cli.py
2.923 KB
20 Jan 2026 1.01 PM
root / root
0644
config.py
32.703 KB
20 Jan 2026 1.01 PM
root / root
0644
parser.py
27.628 KB
20 Jan 2026 1.01 PM
root / root
0644
utils.py
1.261 KB
20 Jan 2026 1.01 PM
root / root
0644
violations.py
12.12 KB
20 Jan 2026 1.01 PM
root / root
0644
wordlists.py
1.512 KB
20 Jan 2026 1.01 PM
root / root
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2025 CONTACT ME
Static GIF