$47 GRAYBYTE WORDPRESS FILE MANAGER $39

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.145
OPTIONS : CRL = ON | WGT = ON | SDO = OFF | PKEX = OFF
DEACTIVATED : NONE

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

HOME
Current File : /opt/cloudlinux/venv/lib/python3.11/site-packages/pylint_django//utils.py
"""Utils."""
import sys

import astroid
from astroid.bases import Instance
from astroid.exceptions import InferenceError
from astroid.nodes import ClassDef

from pylint_django.compat import Uninferable

PY3 = sys.version_info >= (3, 0)  # TODO: pylint_django doesn't support Py2 any more


def node_is_subclass(cls, *subclass_names):
    """Checks if cls node has parent with subclass_name."""
    if not isinstance(cls, (ClassDef, Instance)):
        return False

    if cls.bases == Uninferable:
        return False
    for base_cls in cls.bases:
        try:
            for inf in base_cls.inferred():
                if inf.qname() in subclass_names:
                    return True
                if inf != cls and node_is_subclass(inf, *subclass_names):
                    # check up the hierarchy in case we are a subclass of
                    # a subclass of a subclass ...
                    return True
        except InferenceError:
            continue

    return False


def is_migrations_module(node):
    if not isinstance(node, astroid.Module):
        return False

    return "migrations" in node.path[0] and not node.path[0].endswith("__init__.py")


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
augmentations
--
11 Feb 2026 9.30 AM
root / root
0755
checkers
--
11 Feb 2026 9.30 AM
root / root
0755
tests
--
11 Feb 2026 9.30 AM
root / root
0755
transforms
--
11 Feb 2026 9.30 AM
root / root
0755
__init__.py
0.384 KB
20 Jan 2026 1.01 PM
root / root
0644
__pkginfo__.py
0.027 KB
20 Jan 2026 1.01 PM
root / root
0644
compat.py
1.07 KB
20 Jan 2026 1.01 PM
root / root
0644
plugin.py
1.478 KB
20 Jan 2026 1.01 PM
root / root
0644
utils.py
1.149 KB
20 Jan 2026 1.01 PM
root / root
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2025 CONTACT ME
Static GIF