From 87b6634e0112929ea455c91831906abd03ecda9b Mon Sep 17 00:00:00 2001 From: Jan Snasel Date: Mon, 19 Feb 2024 11:02:44 +0000 Subject: [PATCH] fix: Add comments --- pylint_nautobot/utils.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pylint_nautobot/utils.py b/pylint_nautobot/utils.py index 655d060..34672b2 100644 --- a/pylint_nautobot/utils.py +++ b/pylint_nautobot/utils.py @@ -138,8 +138,10 @@ def get_model_name_from_queryset(node: NodeNG) -> str: elif isinstance(node, Attribute): if node.attrname == "objects": if isinstance(node.expr, Name): + # Covers `queryset = AddressObject.objects.all()` return node.expr.name if isinstance(node.expr, Attribute): + # Covers `queryset = models.AddressObject.objects.all()` return node.expr.attrname node = node.expr else: