Skip to content

Conversation

vitthalmagadum
Copy link
Collaborator

Description

anta/anta/result_manager/init.py", line 298, in sort
self._result_entries.sort(key=lambda result: [getattr(result, field) for field in sort_by])
~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: '<' not supported between instances of 'NoneType' and 'str'

Fixes #1110

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have run pre-commit for code linting and typing (pre-commit run)
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes (tox -e testenv)

@vitthalmagadum vitthalmagadum changed the title bug(anta): Fixing the TypeError: '<' not supported between instances of 'NoneType' and 'str' fix(anta): Fixing the TypeError: '<' not supported between instances of 'NoneType' and 'str' Mar 19, 2025
Copy link

Copy link

codspeed-hq bot commented Mar 19, 2025

CodSpeed Performance Report

Merging #1113 will not alter performance

Comparing vitthalmagadum:bug/result_manager (92c0f61) with main (2ba75e4)

Summary

✅ 22 untouched benchmarks

Copy link
Contributor

@carl-baillargeon carl-baillargeon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Tested locally:

    {
        "name": "dc1-leaf1a",
        "test": "VerifyInterfaceDiscards",
        "categories": [
            "interfaces"
        ],
        "description": "Verifies that the interfaces packet discard counters are equal to zero.",
        "result": "unset",
        "messages": [],
        "custom_field": null
    },
    {
        "name": "dc1-leaf1a",
        "test": "VerifyInterfaceDiscards",
        "categories": [
            "interfaces"
        ],
        "description": "Verifies that the interfaces packet discard counters are equal to zero.",
        "result": "unset",
        "messages": [],
        "custom_field": "Generated by AVD"
    },

@carl-baillargeon carl-baillargeon merged commit 58350af into aristanetworks:main Mar 19, 2025
25 of 26 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

bug(anta): TypeError: '<' not supported between instances of 'NoneType' and 'str'
2 participants